3 ms·
Is there any comparison of the tooling/performance/etc of MessagePack, BSON, Protobuffers, Flatbuffers, and plain JSON?
by gravypod 7y ago
Is there any comparison of the tooling/performance/etc of MessagePack, BSON, Protobuffers, Flatbuffers, and plain JSON?
- tracker1 7y agoLots.. however, best bet is to search for your language, platform and use-case. The performance can vary widely by platform and language. JSON is actually faster in some platforms or libraries, binary options faster in others. Connection interface and overhead are also an issue.
- GordonS 7y agoIt's for a specific library of course, but there are some numbers here: https://github.com/neuecc/MessagePack-CSharp https://github.com/neuecc/MessagePack-CSharp
- brianpgordon 7y agoAlso Avro and Thrift, please!
- ludocode 7y agoI did some pretty extensive benchmarking of various schemaless serialization libraries a few years back. All of these libraries have advanced quite a bit since then so it's a bit out of date, but the relative speeds of MessagePack vs JSON and BSON are probably still relevant: https://github.com/ludocode/schemaless-benchmarks https://github.com/ludocode/schemaless-benchmarks I haven't compared them to schema formats like Protobuf or FlatBuffers yet because the use cases are pretty different. I like MessagePack for small projects or rapid prototyping because you don't need to integrate any big libraries or set up code generation as part of your buildsystem. (Mostly I got sick of integrating the C++ Protobuf library into embedded projects.) The MessagePack format is a lot simpler than Protobuf and the best implementations are nowhere near as allocation-prone as the reference implementation so I expect they would beat it flat out on performance, though the messages may be slightly larger. They would probably beat FlatBuffers for encoding speed as well, but I don't expect any schemaless format could beat FlatBuffers for decoding speed.
- katnegermis 7y agoAt noesis.gg we made a small, not-at-all scientific comparison of our JSON and flatbuffers implementations: https://www.noesis.gg/news/player-movement-speedup.html https://www.noesis.gg/news/player-movement-speedup.html. The somewhat silly video on that page shows the actual difference in performance our users felt after the change. It was a _huge_ benefit, both in terms of loading time, but also in terms of memory, vastly increasing the number of CS:GO rounds that could be analyzed simultaneously.