[erlang-questions] Erlang arithmetics

Richard O'Keefe ok@REDACTED
Tue Nov 2 00:11:47 CET 2010


On 1/11/2010, at 8:50 PM, Morten Krogh wrote:

> Richard,
> 
> my comment was for arithmetic on same type integers between 1 and 1000.

Ah.  I didn't understand that.
> 
> The actual number of clocks depends on the position of the most
> significant bit in the ... multiplier."
> 
> 
> I tried testing on a C program ...
> The test was on a intel core duo chip.

The hardware matters.  For example, SPARC V7 didn't have a hardware multiply;
the software multiply had a single threshold early-out check.  SPARC V8 had
32x32->64 bit multiply in hardware; SPARC V9 has 64x64->64.

Current generation desktop chips are likely to have a single-cycle multiplier.
These require lots of chip area, but then, current generation desktop chips
*have* lots of chip area to spare.  Low power devices are likely to use
different methods, and so are seriously multicore chips like the Sun T2.
It would be interesting to know what the Tilera chips do.
(Did the 512-core Tilera servers announced in June ever see the light of day?)




More information about the erlang-questions mailing list