3 ms·
Don't get too excited about zero-copy. Copying is cheap if the data was recently referenced and is in cache. Conversely, if the data was put in memory by a per
by Animats 12y ago
Don't get too excited about zero-copy. Copying is cheap if the data was recently referenced and is in cache. Conversely, if the data was put in memory by a peripheral device, it costs almost as much as a copy to get it into the CPU's caches.
The bookkeeping associated with zero-copy often exceeds the copying cost. This was the curse of the original message-passing Mach implementation, which gave microkernels a bad name.
- marknadal 12y agoWhat are your thoughts on http://kentonv.github.io/capnproto/ http://kentonv.github.io/capnproto/ ?
- Animats 12y agoThat the sender can probably crash the receiver with a malformed offset in a message. I'd like to see marshalling as a language feature. It's compilable, done often, and has an effect on performance. Many marshalling systems, from OpenRPC to protocol buffers, use a precompiler. But that adds another level of language.
- geofft 12y ago> That the sender can probably crash the receiver with a malformed offset in a message. Errr, that would be a major bug in capnproto. While it's definitely possible the software has bugs, it's certainly a design constraint that the sender absolutely cannot crash the receiver. http://kentonv.github.io/capnproto/faq.html#arent-messages-that-contain-pointers-a-huge-security-problem http://kentonv.github.io/capnproto/faq.html#arent-messages-t...