[zeromq-dev] Endianness conversion functions

Auer, Jens jens.auer at cgi.com
Mon May 11 22:56:57 CEST 2015


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 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<mailto: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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150511/cf36a3bb/attachment.htm>

More information about the zeromq-dev mailing list