Hacker News new | past | comments | ask | show | jobs | submit login

It doesn't look like zero-copy though in this example:

    UserPacket packet;
    stream >> packet;
That is at least one copy.



Correct but it doesn't claim to be zero-copy overall. Apologies if it was misleading. In the README, zero-copy is mentioned in context of using view() and span() to obtain views into the buffer, which does allow for it. Very much a "there be dragons but if you're sure..." feature but it's there as an option.

I've also built some tooling on top that makes use of those functions to do zero-copy deserialisation where viable, so it is possible in the right scenarios with a bit of work but it definitely isn't going to always fit.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: