Friday, December 12, 2003

3.1. Better Performance with Bigger Integers

- Long strings of bits and bytes [i.e., using 64-bit integers for data movement, zeroing, or logical operations on bit strings.]
(This turned out to happen via long long in C, which let people write code easily portable between 32- and 64-bit CPUs.)
- Graphics
- Integer arithmetic
"Most chips make addition and subtraction of multiprecision integers
(i.e., 64-bit, 96-bit, 128-bit, etc.) reasonably fast, but multiplication
and division are often quite slow. Cryptography is a heavy user of
multiple-precision multiplies and divides. Financial calculations could
use integer arithmetic; 32-bit integers are far too small, but 64-bit
integers are easily big enough to represent objects like the US national
debt or Microsoft's annual revenue to the penny." [still true!]

Note that for all of these, hardware support of 64-bits is a SPEED
difference, not a major structural difference, with use of long long
between 32- and 64-bit CPUs similar to use of long between PDP-11 and
VAX -the same code is used, but the smaller system needs to do more
operations.

3.2 Big Time-Addressing
"Perhaps more important than using 64-bit integers for performance is
the extension of memory addressing above 32-bits, enabling applications
that are otherwise difficult to program."

No comments: