News for hackers. Stuff that matters.
Re:FlexBuffers by bsaul on Sunday June 21, 2020 @03:18AM (#23590445)
there is a comment up thread from people at google claiming flatbuffers aren't faster than protobuf in practice. that surprises me a lot, as i was interested in flat buffers for performance gains. do you have an opinion ?
Re:FlexBuffers by Aardappel on Sunday June 21, 2020 @04:22PM (#23595093)
I've worked with people internally, and it is indeed a challenge to speed up services with FlatBuffers. This is because 99.9% of internal communications flow over Protobuf, and many such services are simply: receive Protobuf, modify a few things, send it on the next service. So to deploy FlatBuffers there, you usually have to translate from Protobuf to FlatBuffers, do some high intensity stretch of communication in FlatBuffers only, then convert back. Given the cost of conversions, it would require replacing fairly large amounts of infrastructure for it to be a clear win, and given that those conversions have to be written entirely by hand, that is often not feasible. So translation of what the other comment said: "we gave up".

FlatBuffers is used to great effect, but often with new teams building new things, that are not yet shackled in Protobuf everywhere, like many of the AI related teams.

Re:FlexBuffers by bsaul on Monday June 22, 2020 @04:53AM (#23598386)
Ok, now that gives a very different picture from what the original comment explained. Of course, protobuf to flatbuffer is slower than just protobuf...

Thanks a lot for your time (and work!). FYI, i'm planning on using flatbuffer for communication between a mobile app native code and a cross-platform library, hoping to save on data decoding time. A bit similar to what Xi ide is doing. If you have any advice, you're welcome ! :D

Re:FlexBuffers by Aardappel on Monday June 22, 2020 @12:03PM (#23601730)
If you use it for networked communications, by default use the verifier on the C++ side, would be my tip.
Re:FlexBuffers by dreinhardt on Sunday June 21, 2020 @05:47AM (#23591015)
As i understood it, this is not about being faster, but about being more memory efficient.
Re:FlexBuffers by bsaul on Sunday June 21, 2020 @06:26AM (#23591161)
zero copy supposedly means you're saving on memory allocation when reading. You're saving the decoding step, so my guess would have been that in practice you're gaining both on memory consumption and cpu.