alecthomas / go_serialization_benchmarks

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

add mum to benchmarks #90

Closed itsmontoya closed 3 years ago

itsmontoya commented 3 years ago
% go test --bench=.                      

A test suite for benchmarking various Go serialization methods.

See README.md for details on running the benchmarks.

goos: darwin
goarch: amd64
pkg: github.com/alecthomas/go_serialization_benchmarks
BenchmarkGotinyMarshal-4                                 9872818               120 ns/op                48.0 B/serial            0 B/op          0 allocs/op
BenchmarkGotinyUnmarshal-4                               4527561               242 ns/op                48.0 B/serial          112 B/op          3 allocs/op
BenchmarkGotinyNoTimeMarshal-4                           9440686               115 ns/op                48.0 B/serial            0 B/op          0 allocs/op
BenchmarkGotinyNoTimeUnmarshal-4                         4977139               220 ns/op                48.0 B/serial           96 B/op          3 allocs/op
BenchmarkMsgpMarshal-4                                   6020641               185 ns/op                97.0 B/serial          128 B/op          1 allocs/op
BenchmarkMsgpUnmarshal-4                                 3560727               317 ns/op                97.0 B/serial          112 B/op          3 allocs/op
BenchmarkVmihailencoMsgpackMarshal-4                     1000000              1043 ns/op               100 B/serial            400 B/op          7 allocs/op
BenchmarkVmihailencoMsgpackUnmarshal-4                    661540              1567 ns/op               100 B/serial            416 B/op         13 allocs/op
BenchmarkJsonMarshal-4                                    374043              2974 ns/op               149 B/serial            944 B/op          6 allocs/op
BenchmarkJsonUnmarshal-4                                  363940              3183 ns/op               149 B/serial            343 B/op          6 allocs/op
BenchmarkJsonIterMarshal-4                                321696              3300 ns/op               149 B/serial           1112 B/op          8 allocs/op
BenchmarkJsonIterUnmarshal-4                              396205              2852 ns/op               149 B/serial            447 B/op         14 allocs/op
BenchmarkEasyJsonMarshal-4                                780276              1435 ns/op               149 B/serial            783 B/op          5 allocs/op
BenchmarkEasyJsonUnmarshal-4                              829750              1430 ns/op               149 B/serial            159 B/op          4 allocs/op
BenchmarkBsonMarshal-4                                    927975              1208 ns/op               110 B/serial            392 B/op         10 allocs/op
BenchmarkBsonUnmarshal-4                                  681440              1831 ns/op               110 B/serial            232 B/op         19 allocs/op
BenchmarkGobMarshal-4                                    1642177               729 ns/op                63.6 B/serial           48 B/op          2 allocs/op
BenchmarkGobUnmarshal-4                                  1570237               778 ns/op                63.6 B/serial          112 B/op          3 allocs/op
BenchmarkXDRMarshal-4                                     705164              1581 ns/op                88.0 B/serial          392 B/op         19 allocs/op
BenchmarkXDRUnmarshal-4                                   835717              1429 ns/op                88.0 B/serial          224 B/op         11 allocs/op
BenchmarkUgorjiCodecMsgpackMarshal-4                      997056              1164 ns/op                91.0 B/serial         1312 B/op          3 allocs/op
BenchmarkUgorjiCodecMsgpackUnmarshal-4                    926092              1234 ns/op                91.0 B/serial          496 B/op          4 allocs/op
BenchmarkUgorjiCodecBincMarshal-4                         790148              1423 ns/op                95.0 B/serial         1328 B/op          4 allocs/op
BenchmarkUgorjiCodecBincUnmarshal-4                       723487              1489 ns/op                95.0 B/serial          656 B/op          7 allocs/op
BenchmarkSerealMarshal-4                                  419301              2639 ns/op               132 B/serial            904 B/op         20 allocs/op
BenchmarkSerealUnmarshal-4                                346064              3096 ns/op               132 B/serial           1008 B/op         34 allocs/op
BenchmarkBinaryMarshal-4                                  883579              1371 ns/op                61.0 B/serial          320 B/op         21 allocs/op
BenchmarkBinaryUnmarshal-4                                845904              1465 ns/op                61.0 B/serial          320 B/op         22 allocs/op
BenchmarkFlatBuffersMarshal-4                            4068262               293 ns/op                95.2 B/serial            0 B/op          0 allocs/op
BenchmarkFlatBuffersUnmarshal-4                          4188970               275 ns/op                95.1 B/serial          112 B/op          3 allocs/op
BenchmarkCapNProtoMarshal-4                              2854172               409 ns/op                96.0 B/serial           56 B/op          2 allocs/op
BenchmarkCapNProtoUnmarshal-4                            2583148               437 ns/op                96.0 B/serial          200 B/op          6 allocs/op
BenchmarkCapNProto2Marshal-4                             1877834               621 ns/op                96.0 B/serial          244 B/op          3 allocs/op
BenchmarkCapNProto2Unmarshal-4                           1439686               822 ns/op                96.0 B/serial          320 B/op          6 allocs/op
BenchmarkHproseMarshal-4                                 1290886               945 ns/op                82.3 B/serial          427 B/op          8 allocs/op
BenchmarkHproseUnmarshal-4                                952369              1234 ns/op                82.3 B/serial          320 B/op         10 allocs/op
BenchmarkHprose2Marshal-4                                1441453               751 ns/op                82.3 B/serial            0 B/op          0 allocs/op
BenchmarkHprose2Unmarshal-4                              1960272               593 ns/op                82.3 B/serial          144 B/op          4 allocs/op
BenchmarkProtobufMarshal-4                               1531833               766 ns/op                52.0 B/serial          152 B/op          7 allocs/op
BenchmarkProtobufUnmarshal-4                             1634157               736 ns/op                52.0 B/serial          192 B/op         10 allocs/op
BenchmarkGoprotobufMarshal-4                             4015900               285 ns/op                53.0 B/serial           64 B/op          1 allocs/op
BenchmarkGoprotobufUnmarshal-4                           2573804               442 ns/op                53.0 B/serial          168 B/op          9 allocs/op
BenchmarkGogoprotobufMarshal-4                           6941794               152 ns/op                53.0 B/serial           64 B/op          1 allocs/op
BenchmarkGogoprotobufUnmarshal-4                         4957254               225 ns/op                53.0 B/serial           96 B/op          3 allocs/op
BenchmarkColferMarshal-4                                 7666252               131 ns/op                51.1 B/serial           64 B/op          1 allocs/op
BenchmarkColferUnmarshal-4                               5594133               196 ns/op                52.0 B/serial          112 B/op          3 allocs/op
BenchmarkGencodeMarshal-4                                6992318               172 ns/op                53.0 B/serial           80 B/op          2 allocs/op
BenchmarkGencodeUnmarshal-4                              5373534               197 ns/op                53.0 B/serial          112 B/op          3 allocs/op
BenchmarkGencodeUnsafeMarshal-4                          9672682               107 ns/op                46.0 B/serial           48 B/op          1 allocs/op
BenchmarkGencodeUnsafeUnmarshal-4                        6905480               161 ns/op                46.0 B/serial           96 B/op          3 allocs/op
BenchmarkXDR2Marshal-4                                   6325850               174 ns/op                60.0 B/serial           64 B/op          1 allocs/op
BenchmarkXDR2Unmarshal-4                                 7628350               138 ns/op                60.0 B/serial           32 B/op          2 allocs/op
BenchmarkGoAvroMarshal-4                                  382910              2847 ns/op                47.0 B/serial         1008 B/op         30 allocs/op
BenchmarkGoAvroUnmarshal-4                                176532              6746 ns/op                47.0 B/serial         3328 B/op         85 allocs/op
BenchmarkGoAvro2TextMarshal-4                             386836              3045 ns/op               134 B/serial           1320 B/op         20 allocs/op
BenchmarkGoAvro2TextUnmarshal-4                           422394              2994 ns/op               134 B/serial            799 B/op         33 allocs/op
BenchmarkGoAvro2BinaryMarshal-4                          1261809               916 ns/op                47.0 B/serial          488 B/op          9 allocs/op
BenchmarkGoAvro2BinaryUnmarshal-4                        1000000              1001 ns/op                47.0 B/serial          560 B/op         11 allocs/op
BenchmarkIkeaMarshal-4                                   1805868               644 ns/op                55.0 B/serial           72 B/op          8 allocs/op
BenchmarkIkeaUnmarshal-4                                 1480500               801 ns/op                55.0 B/serial          160 B/op         11 allocs/op
BenchmarkShamatonMapMsgpackMarshal-4                     1435302               820 ns/op                92.0 B/serial          208 B/op          4 allocs/op
BenchmarkShamatonMapMsgpackUnmarshal-4                   1681263               697 ns/op                92.0 B/serial          144 B/op          3 allocs/op
BenchmarkShamatonArrayMsgpackMarshal-4                   1599322               722 ns/op                50.0 B/serial          176 B/op          4 allocs/op
BenchmarkShamatonArrayMsgpackUnmarshal-4                 2419197               473 ns/op                50.0 B/serial          144 B/op          3 allocs/op
BenchmarkSSZNoTimeNoStringNoFloatAMarshal-4               235450              4527 ns/op                55.0 B/serial          440 B/op         71 allocs/op
BenchmarkSSZNoTimeNoStringNoFloatAUnmarshal-4             141502              7568 ns/op                55.0 B/serial         1392 B/op         78 allocs/op
BenchmarkMumMarshal-4                                   11230100               106 ns/op                48.0 B/serial            0 B/op          0 allocs/op
BenchmarkMumUnmarshal-4                                  5189352               216 ns/op                48.0 B/serial           80 B/op          1 allocs/op
PASS
ok      github.com/alecthomas/go_serialization_benchmarks       107.121s
alecthomas commented 3 years ago

You'll need to add those benchmarks to the README.