Skip to content

Instantly share code, notes, and snippets.

@bwmarrin
Created July 19, 2018 16:00
Show Gist options
  • Save bwmarrin/d93c36e3c2f9d10bff5f1bfc0927a67c to your computer and use it in GitHub Desktop.
Save bwmarrin/d93c36e3c2f9d10bff5f1bfc0927a67c to your computer and use it in GitHub Desktop.
IkeaPacker vs The Rest.
# go version
go version go1.10.2 freebsd/amd64
# sysctl hw.model hw.machine hw.ncpu
hw.model: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
hw.machine: amd64
hw.ncpu: 12
# sysctl hw.physmem
hw.physmem: 68647251968
# uname -mrs
FreeBSD 11.1-RELEASE-p9 amd64
BenchmarkMsgpMarshal-12 10000000 211 ns/op 128 B/op 1 allocs/op
BenchmarkMsgpUnmarshal-12 3000000 405 ns/op 112 B/op 3 allocs/op
BenchmarkVmihailencoMsgpackMarshal-12 1000000 2325 ns/op 368 B/op 6 allocs/op
BenchmarkVmihailencoMsgpackUnmarshal-12 500000 2583 ns/op 384 B/op 13 allocs/op
BenchmarkJsonMarshal-12 300000 5230 ns/op 1224 B/op 9 allocs/op
BenchmarkJsonUnmarshal-12 300000 4989 ns/op 464 B/op 7 allocs/op
BenchmarkEasyJsonMarshal-12 1000000 1789 ns/op 784 B/op 5 allocs/op
BenchmarkEasyJsonUnmarshal-12 1000000 1917 ns/op 160 B/op 4 allocs/op
BenchmarkBsonMarshal-12 1000000 1701 ns/op 392 B/op 10 allocs/op
BenchmarkBsonUnmarshal-12 1000000 2345 ns/op 244 B/op 19 allocs/op
BenchmarkGobMarshal-12 1000000 1185 ns/op 48 B/op 2 allocs/op
BenchmarkGobUnmarshal-12 1000000 1229 ns/op 112 B/op 3 allocs/op
BenchmarkXdrMarshal-12 1000000 2170 ns/op 455 B/op 20 allocs/op
BenchmarkXdrUnmarshal-12 1000000 1944 ns/op 239 B/op 11 allocs/op
BenchmarkUgorjiCodecMsgpackMarshal-12 1000000 1442 ns/op 561 B/op 6 allocs/op
BenchmarkUgorjiCodecMsgpackUnmarshal-12 1000000 1717 ns/op 449 B/op 6 allocs/op
BenchmarkSerealMarshal-12 500000 3747 ns/op 912 B/op 21 allocs/op
BenchmarkSerealUnmarshal-12 500000 3959 ns/op 1008 B/op 34 allocs/op
BenchmarkBinaryMarshal-12 1000000 1705 ns/op 334 B/op 20 allocs/op
BenchmarkBinaryUnmarshal-12 1000000 1868 ns/op 336 B/op 22 allocs/op
BenchmarkFlatBuffersMarshal-12 3000000 428 ns/op 0 B/op 0 allocs/op
BenchmarkFlatBuffersUnmarshal-12 5000000 308 ns/op 112 B/op 3 allocs/op
BenchmarkCapNProtoMarshal-12 3000000 595 ns/op 56 B/op 2 allocs/op
BenchmarkCapNProtoUnmarshal-12 3000000 529 ns/op 200 B/op 6 allocs/op
BenchmarkCapNProto2Marshal-12 2000000 850 ns/op 244 B/op 3 allocs/op
BenchmarkCapNProto2Unmarshal-12 1000000 1183 ns/op 320 B/op 6 allocs/op
BenchmarkHproseMarshal-12 1000000 1214 ns/op 479 B/op 8 allocs/op
BenchmarkHproseUnmarshal-12 1000000 1358 ns/op 320 B/op 10 allocs/op
BenchmarkProtobufMarshal-12 1000000 1162 ns/op 200 B/op 7 allocs/op
BenchmarkProtobufUnmarshal-12 1000000 1074 ns/op 192 B/op 10 allocs/op
BenchmarkGoprotobufMarshal-12 3000000 525 ns/op 96 B/op 2 allocs/op
BenchmarkGoprotobufUnmarshal-12 2000000 819 ns/op 200 B/op 10 allocs/op
BenchmarkGogoprotobufMarshal-12 10000000 191 ns/op 64 B/op 1 allocs/op
BenchmarkGogoprotobufUnmarshal-12 5000000 290 ns/op 96 B/op 3 allocs/op
BenchmarkColferMarshal-12 10000000 160 ns/op 64 B/op 1 allocs/op
BenchmarkColferUnmarshal-12 10000000 228 ns/op 112 B/op 3 allocs/op
BenchmarkGencodeMarshal-12 10000000 201 ns/op 80 B/op 2 allocs/op
BenchmarkGencodeUnmarshal-12 10000000 237 ns/op 112 B/op 3 allocs/op
BenchmarkGencodeUnsafeMarshal-12 10000000 126 ns/op 48 B/op 1 allocs/op
BenchmarkGencodeUnsafeUnmarshal-12 10000000 184 ns/op 96 B/op 3 allocs/op
BenchmarkXDR2Marshal-12 10000000 192 ns/op 64 B/op 1 allocs/op
BenchmarkXDR2Unmarshal-12 10000000 173 ns/op 32 B/op 2 allocs/op
BenchmarkGoAvroMarshal-12 500000 3190 ns/op 1030 B/op 31 allocs/op
BenchmarkGoAvroUnmarshal-12 200000 7811 ns/op 3437 B/op 87 allocs/op
BenchmarkGoAvro2TextMarshal-12 500000 3938 ns/op 1326 B/op 20 allocs/op
BenchmarkGoAvro2TextUnmarshal-12 500000 3492 ns/op 807 B/op 34 allocs/op
BenchmarkGoAvro2BinaryMarshal-12 1000000 1210 ns/op 510 B/op 11 allocs/op
BenchmarkGoAvro2BinaryUnmarshal-12 1000000 1256 ns/op 576 B/op 13 allocs/op
BenchmarkIkkerensMarshal-12 2000000 767 ns/op 72 B/op 8 allocs/op
BenchmarkIkkerensUnmarshal-12 2000000 984 ns/op 160 B/op 11 allocs/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment