You can further improve on this:
Just use a machine that is even slower on
emulating floating point arithmetic. Then
the factor will approach 1 ...
When I compiled the C code on my Sparc, it took 0.076 seconds to run the C
version. I'd guess that more than 3.5 of the 4 seconds it took your PC were
spent in the FP emulation library. If you'd repeat the test on a 486DX2
with a good C compiler, you'd probably get a time of 0.2 seconds for the C
version and 5 to 10 seconds for the Smalltalk version.
That's a factor of 1/25 to 1/50, your value of 1/3 is only possible by
using a computer with slooow FP ...
-- Stefan Esser Internet: <se@MI.Uni-Koeln.DE> Mathematisches Institut Tel: +49 221 4706010 Universitaet zu Koeln FAX: +49 221 4705160 Weyertal 80 50931 Koeln