[Ecls-list] ECL behavior on some array related code

Waldek Hebisch hebisch at math.uni.wroc.pl
Thu May 20 14:53:00 UTC 2010


Matthew Mondor wrote:
> On Wed, 18 May 2010 15:31:41 +0200
> 
> Very impressive!  Perhaps a small note:
> 
> I noticed that the smallest possible C signed int type, (uint8_t) was
> selected for such low values, however on x86 (and possibly other 32+
> bit processors, except that I know m68k is an exception), operations on
> an int are generally faster than on an 8-bit or 16-bit type which
> internally requires implicit shift/and.

Some time ago I did a few benchmarks comparing 8-bit, 16-bit and
32-bit operations on x86.  The result is that computations
(operations in processor core) typically take almost the same time.
However, smaller variables take less space, so if you are moving
large amounts of data then using small variables gives much better
speed.

Bottom line: use small variables unless you have tiny amount of
data on which you perform insane number of operations.

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 




More information about the ecl-devel mailing list