I'm not very happy with the do {} while() statement in C

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: I'm not very happy with the do {} while() statement in C

Post by syzygy »

Little endian is advantageous for byte-by-byte addition and subtraction.

On the other hand, the Huffman coder in my TB file compressor is better suited for big endian (unless I write and read data from the end of the 64-byte block to the beginning, which would probably slow down a bit since the cache line will not be retrieved from memory in the same order).
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: I'm not very happy with the do {} while() statement in C

Post by AlvaroBegue »

syzygy wrote: Other Holy Wars worth fighting for are Vi vs Emacs, Linux vs Windows, Gnome vs KDE, C64 vs Spectrum, C64 vs Atari, Amiga vs Mac.
Emacs, Linux, KDE, MSX (I know it wasn't an option), Atari, Mac.

Oh, and little endian (store numbers in base 256, like this: a[0] + a[1]*256^1 + a[2] * 256^2 + ...).