Miguel Molina
Feb 25, 2017 · 1 min read

First of all, great post!

But I think it would be more fair to compare JSON using something like ffjson instead. Protobuf uses generated code, so to be fair you could be using ffjson to do the same with JSON.

Don’t get me wrong, protobuf still outperforms JSON even using ffjson, but the comparison is more fair, imho.

This are the results on my machine using ffjson, which is a 2x speedup.

BenchmarkOrderFFSONMarshal-4 1000000 1685 ns/op
BenchmarkOrderFFSONUnmarshal-4 500000 3050 ns/op
PASS

    Miguel Molina

    Written by

    Senior Software Developer at @srcd_.