Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why does it have a switch for that, and wouldn't it have a big overhead?


IBM has traditionally been a big-endian shop - mainframes are BE, AIX and IBM i on Power are BE. The Motorola 68K, which Apple was using before switching to PowerPC, was also BE.

LE support was in the original PowerPC chips from the 90s, and was used to support the Windows NT port that existed until NT4. Then switchable endianness disappeared for a while, and finally came back in POWER8 when IBM decided it wanted to expand the market for Power and that LE was helpful because it makes porting easier and is more familiar to x86 programmers.

It doesn't, AFAIK, have any overhead - remember that byte swapping can be done in combinational logic.


combinatorial logic... I guess byte order is just about which order you connect the wires between two components, and then it's free modulo "wire" length. That's my circuit board model of it, then.


I honestly have no idea haha. I speculate big machines dealing with legacy data or code not expecting big endian have an escape hatch that doesn't involve a complete rewrite.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: