HeapsIO / hxbit

Haxe Binary serialization and network synchronization library
155 stars 30 forks source link

hxbit vs protobuf vs flat buffers #20

Closed flashultra closed 6 years ago

flashultra commented 6 years ago

How is hxbit vs Protocol buffers ( https://github.com/google/protobuf ) in terms of size and speed ( serializing / deserializing data ) ? Also how hxbit is compare flatbuffers ( https://github.com/google/flatbuffers ) ? Flat buffers is looks good for game ( there is not haxe port , but someone tried https://github.com/google/flatbuffers/issues/239 )

flashultra commented 6 years ago

Here is benchmark: http://google.github.io/flatbuffers/flatbuffers_benchmarks.html

ncannasse commented 6 years ago

I haven't looked at pure benchmarks, but in terms of data size hxbit references ids by default, enabling circular objects, and only stores the data itself, not the field ids like protocol buffers. For versioning you can store an additional schema but then it's only once per class.