[zeromq-dev] Endianness conversion functions

Pieter Hintjens ph at imatix.com
Mon May 11 23:43:08 CEST 2015

If you can show that it's faster to use the default functions, please make
a pull request, we'll merge it.

On Mon, May 11, 2015 at 10:56 PM, Auer, Jens <jens.auer at cgi.com> wrote:

>  Hi,
> I've looking at the zeroMQ source code a little bit and was surprised that
> wire.hpp implements custom endianess converison function to convert 16, 32
> and 64 bit values from/to network byte-order. Is there any reason for not
> using available functions like hton* or htobe family on Linux? I am sure it
> is a micro-optimization (but it is on the criticl path for large messages),
> but recent Intel CPUs provide an assembler instruction which could be used
> with the __builtin_bswap64 intrinsic for gcc and icc.
> Best wishes,
>   Jens
>      --
>  *Jens Auer *| CGI | Software-Engineer
>  CGI (Germany) GmbH & Co. KG
> Rheinstraße 95 | 64295 Darmstadt | Germany
> T: +49 6151 36860 154
> *jens.auer at cgi.com* <jens.auer at cgi.com>
> Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter
> *de.cgi.com/pflichtangaben* <http://de.cgi.com/pflichtangaben>.
> CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to
> CGI Group Inc. and its affiliates may be contained in this message. If you
> are not a recipient indicated or intended in this message (or responsible
> for delivery of this message to such person), or you think for any reason
> that this message may have been addressed to you in error, you may not use
> or copy or deliver this message to anyone else. In such case, you should
> destroy this message and are asked to notify the sender by reply e-mail.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150511/da9c6c83/attachment.htm>

More information about the zeromq-dev mailing list