A production issue has led our team to the following questions:
- Under RHEL6 using GCC 4.4.6, how are
ntohs
andntohl
implemented? - Are the implementations known to be fast or slow?
- How can I actually see the generated assembly code for the functions?
I know the implications behind questions may seem far-fetched and ridiculous, but I have been asked to investigate.
The hardware in question is an Intel box, little endian, 64-bit processor and compiled in 64 bit.