What is the fastest way to encode the arbitrary struct into bytes?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • go_serialization_benchmarks

    Benchmarks of Go serialization methods

  • This might be of interest: https://github.com/alecthomas/go_serialization_benchmarks

  • msgp

    A Go code generator for MessagePack / msgpack.org[Go]

  • For a similar case at MinIO we use messagepack - with tinylib/msgp.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • MessagePack

    MessagePack serializer implementation for Java / msgpack.org[Java]

  • so appreciate such a detailed reply, thanks. btw, why did you choose tinylib/msgp from 4 available go-impls?

  • cbor

    CBOR codec (RFC 8949) with CBOR tags, Go struct tags (toarray, keyasint, omitempty), float64/32/16, big.Int, and fuzz tested billions of execs.

  • Ha, no suggestions for cbor https://github.com/fxamacker/cbor

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts