0

Can FlatBuffers still prove beneficial in terms of performance and memory efficiency when we copy the source stream (e.g. from a streambuf in boost.asio) to a user space application allocated memory? Or does it perform the best with Zero Copy only?

Just curious about this while implementing a boost.asio service using flatbuffers as the protocol.

Any example code to achieve zero copy in context of flatbuffers and boost.asio are also welcome.

Please clarify with some relevant reading material or pointers in case you feel my overall understanding of the topic itself is incorrect at the moment.

Thanks in advance.

Kamesh Rao Yeduvakula
  • 1,215
  • 2
  • 15
  • 27
  • 2
    I have no experience with boost.asio, but yes, FlatBuffers should still be faster than most non-zero-copy alternatives (like e.g. Protobuf) even when 1 copy is made. But the only way to know for sure is to make your own benchmark that is representative of your tech stack. – Aardappel Feb 25 '19 at 18:19
  • before asking "is x beneficial without y?", are you sure that the... x provides "without y" functionality? – RaGa__M Jul 02 '19 at 09:30

0 Answers0