Advertisement

Are there any modern desktops(Windows, Linux, OS X) that use big endian?

Started by March 02, 2016 04:42 PM
9 comments, last by oliii 8 years, 8 months ago
I would bother only if I need cross-platform communication, or multi-platform support. i.e. bitpacking, byte streaming, things that gets passed through the network layer. Endian conversion would automatically convert to a set endianness, through the use a serialiser.

As a rule of thumb, run your data through a proper serialiser, so not packing structs as binary data, or bitfields, enums, which might be optimised differently, or have different width. Rather, serialise each component individually, and for bitstreams, taking advantage of compression (serialise a bool a s single bit rather than a byte, serialise long ints, enums within a fixed range, ect...).

As for optimisations, that's not really where the gains are made, although they can be in some edge cases (memory alignment rules, for particles, GPU commands, ect...).

Everything is better with Metal.

This topic is closed to new replies.

Advertisement