Question

How fast is the procedure to convert from using big endian to little endian?

Was it helpful?

Solution

Very fast. It's a single machine language opcode on most architectures. Even on ancient hardware it would execute in only 2-3 clock cycles.

OTHER TIPS

The speed greatly depends on the implementation and the language. Inlined machine code is extremely fast but an implementation running in an interpreted language may be orders of magnitude slower. If it's not inlined, procedure call overhead may take considerably more time than the actual byte swap.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top