alecthomas / go_serialization_benchmarks

Benchmarks of Go serialization methods
https://alecthomas.github.io/go_serialization_benchmarks/
1.56k stars 158 forks source link

Add baseline benchmark #135

Closed matheusd closed 4 months ago

matheusd commented 4 months ago

The baseline benchmark is a hand-written serialization into a fixed sized buffer with fixed positions for the values.

It is only useful as an upper bound on what is achievable on the standard go runtime.

Results for my machine:

Benchmark_Baseline_Marshal       31755828          38.52 ns/op        47.00 B/serial    0 B/op   0 allocs/op
Benchmark_Baseline_Unmarshal     38182153          30.82 ns/op        47.00 B/serial    0 B/op   0 allocs/op