3 ms·
Little endian has the advantage that you can read the low bits of data without having to adjust the address. So you can for example do long addition in memory o
by bonzini 6y ago
Little endian has the advantage that you can read the low bits of data without having to adjust the address. So you can for example do long addition in memory order rather than having to go backwards, or (with an appropriate representation such as ULEB128) in one pass without knowing the size.
- js8 6y agoMaybe I am biased working on mainframes, but I would personally take big endian over little endian. The reason is when reading a hex dump, I can easily read the binary integers from left to right.
- bonzini 6y agoThat's the only thing that BE has over LE. But for example bitmaps in BE are a huge source of bugs, as readers and writers need to agree on the size to use for memory operations. "SIMD in a word" (e.g. doing strlen or strcmp with 32- or 64-bit memory accesses) might have mostly fallen out of fashion these days, but it's also more efficient in LE.