PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

big endian vs. little endian, why


Your Ad Here

Your Ad Here

I very much prefer big-endian.

big endian vs. little endian, why 1960
When I said "alien" it was my way of referring to an integer format which is not native to the CPU you're running. (The second half of that sentence was intended to my...

The first byte-addressed machines (or any machines, for that matter) that I used were PDP-11 then 6502 then VAX then 8086, all of which were little-endian. But then I moved onto 68000, SPARC, MIPS, PowerPC, HPPA and felt like I'd come home.

Why? I don't know. There isn't one stand-out reason, but a mulbreastude of small ones. Here are just two of them:

- reading a hex dump on a little-endian machine is *painfull*. Hell, the VAX standard tools did machine code listings with each line (instruction) printed in reverse, just because litle-endian is sooo painful.

big endian vs. little endian, why 1959
You need to look at the hardware implementations. Back when transistors were much more expensive, a lot...

- with a big-endian machine you can optimize string operations by using 32 (or 64, or 128...) bit unsigned integer operations to sort and compare strings, which is 4-8-16 times faster than using byte operations. Best with Pascal-style counted strings, but works with C strings with a little bit-banging trickery. e.g. see: 382f5b (note that strlen and the corresponding strcpy-strcat works on both big- and little-endian machines, but the corresponding strcmp works only on big-endian).

If an "old SPARC" is ok now, what's wrong with a new Apple, which will in a few years become as "old Apple", but much fater than the "old Sun"?

-- Bruce 41.1670S spoken -+- Hoult 174.8263E here. ----------O----------



Your Ad Here

List | Previous | Next

big endian vs. little endian, why 1959

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

big endian vs. little endian, why 1957