From: sh...@al...
Date: Thu, 02 Mar 2000 21:51:06 +0900
> I did a round of performance tuning tonight. Essentially, I got rid
> of all but a very few uses of long long; the performance improvement
> is about 40%.
Hmm, I'm surprised it made that much of a difference.
Well, 32-bit arithmetic (add/subtract, at any rate) is one machine
instruction; 64-bit arithmetic is more involved.
Anyway, from a performance point of view, wouldn't it have made more sense
to go from long long to just plain long, rather than int?
For i386, long and int are equivalent, but, on systems with 64 bit CPU's,
long is equivalent to long long, but, these are precisely the same CPU's
that won't take the same performance hits for using long long that the
i386's do.
Well, the error values are all ints. Making them longs would consume
more memory. The performance cost would probably be less on a 64-bit
CPU (if it supports 64-bit arithmetic), though.
--
Robert Krawitz <rl...@al...> http://www.tiac.net/users/rlk/
Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lp...@uu...
Project lead for The Gimp Print -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
|