[zeromq-dev] Zero-copy message API
Martin Sustrik
sustrik at 250bpm.com
Sun Apr 3 18:14:33 CEST 2011
On 04/03/2011 05:50 PM, Pieter Hintjens wrote:
> If we make zero-copy an exceptional case, we can simplify the API
> further, using a style like this:
>
> zmq_msg_t *msg = zmq_msg_new ();
> zmq_msg_set (msg, body, size);
> zmq_sendmsg (&msg); // Destroys message
That drags an mandatory allocation onto the critical path and slows the
whole thing down. Note that currently, in the best case, 0MQ is able to
process without allocations whatsoever.
Martin
More information about the zeromq-dev
mailing list