News for hackers. Stuff that matters.
Re:Coming Soon: AWS Graviton2 Processor for AWS by ksec on Thursday December 05, 2019 @05:29AM (#21711283)
>and when it does, little endian makes more sense from first principles

Could you explain why little endian would make more sense? While I dont take side in this debate, I have always thought Big Endian would make more sense from First principles.

Re:Coming Soon: AWS Graviton2 Processor for AWS by atq2119 on Thursday December 05, 2019 @12:33PM (#21714267)
There are two main applications where I find little endian is more logical: big integer implementations, and bit stream encoding.

With big integers, the logic is simple: if you use little endian, you can operate on the same memory representation of the bigints quite easily with machine integers of different sizes.

A similar phenomenon happens with bit encoding. Let's say you want to encode a sequence of 25-bit integers tightly packed in memory. How do you do that? With little endian, you get a somewhat more natural representation especially for seeking into the bitstream (especially for architectures that allow unaligned memory accesses).

Re:Coming Soon: AWS Graviton2 Processor for AWS by BeeOnRope on Friday December 06, 2019 @01:38PM (#21724715)
> With big integers, the logic is simple: if you use little endian, you can operate on the same memory representation of the bigints quite easily with machine integers of different sizes.

That's true with big endian too, but you just have to store your integers in the opposite way as you would on little endian: with the MSB at the lowest address (which of course is the same as the distinction between little and big endian in the first place).

Basically the bigint layout has to be compatible with the the endianess.

I don't know what bignum implementations do in practice on big endian systems though.