by weland · 11y ago · 0 comments
http://geekandpoke.typepad.com/geekandpoke/2011/09/simply-ex...
(Edit: which is precisely why I prefer BE for anything, unless there is a pressing - usually hardware- and performance-related - requirement for the opposite. Computers are good at reading bytes in swapped order. I suck at it.)
He specifically mentions cases where the data is stored in BE and the program reads it, swaps it, operates with it, swaps it back again and writes it.
The BE comment seems to me to be of much less importance than the other message (kind of like a side comment). And as you say, BE is very much alive today.
How expensive do you think endianness-swapping is?
This is worse than the HP-UX PA to IA transition, the mac 68k to PPC, or PPC to x86, transition/etc.
The least they could have done was some kind of elf loader, and some fat libraries that flips the execution mode for one generation while everyone transitions.
The stated claim was to make it easier for people to transition to POWER from x86 (aka little porting effort), but what they really did was screw their existing customers by requiring them to port their software (big porting effort). I question, why if I'm going to spend the effort to port from BE POWER to LE POWER why I wouldn't just port to x86...
Apple kept screaming at devs that IBM couldn't be guaranteed to keep the arch bi-endian, so Apple couldn't guarantee a big-endian platform and developers shouldn't assume one.
That said, it really didn't matter because all our software had to build and run on x86-64 anyway, so all the endian-specific code was wrapped in preprocessor directives. We could have changed the endianness with a single makefile change.
Yeah, I said it badly. IBM wouldn't guarantee Apple that Power would always support BE, so Apple pushed (or tried to) developers not to assume that.
On the iSeries it has no bearing on application programmers except when using transformation products to other platforms.
Byte endianess is about binary content, which isn't supposed to be read by humans. Humans read only interpretations of the binary data. You shouldn't come nowhere near to the question of if you are or aren't good at reading binary.
You can tell a lot about someone's programming history from statements like this.
Anyone who habitually works on low-level code has plenty of experience working with raw binary data.
P.S.: You are a bad judge of characters. I worked on low-level code (microcontrollers programming, for a living).
But regardless, I agree that no one is really going to be looking at raw binary. Atleast I can't think of a good reason why anyone would.
As somebody who had to generate and read back tokenized files decades ago, I can vouch that little endian sucks.