numeric performance of LW
There's a recent thread in c.l.l. which was started by a nameless troll,
but which was followed up by some lispers which took the challenge and
translated the numeric benchmark into code that was close to C in speed
with both cmucl and sbcl, and Duane Rettig followed up with a beta
for the upcoming ACL 6.2 which made it almost as fast. I tried this
version: http://www.cs.indiana.edu/~bmastenb/misc/almabench.lisp
of the benchmark with LispWorks 4.3.6 (linux), and it wasn't exactly
impressing - it's very evident that the declarations won't stop LW
from consing like hell (se end of message. Actually I think it's
pretty impressive that it is that fast, given that it has allocated
40 GIGABYTES!).
I've tried to do some numeric optimizations in LW before, with little
luck, so I wonder if there is something I miss here, or if LW
actually is quite bad at this kind of numeric stuff?
Note: I'm doing this mostly out of curiousity, for my actual work LW
has so far been more than fast enough. But who knows, I might be doing
something involving floats next, and I'd like not having to switch to
CMUCL or SBCL for that!
I'd LOVE to have unboxed 32-bit integers, though, I do a lot of crypto
stuff in my app, and that is really slow with bignums. (Also on my
make-crypto-faster-wishlist is a built-in implementation of
exponential modulus, that would be really cool, it is the only thing
slowing down my homebrewed RSA code)
Here the timings:
LW 4.3.6 on Athlon XP 2200+-based workstation with linux 2.4/debian
unstable:
==============================================
CL-USER 19 > (time (almabench:main))
Timing the evaluation of (ALMABENCH:MAIN)
user time = 455.280
system time = 1.420
Elapsed time = 0:10:21
Allocation = 40555763480 bytes standard / 66231 bytes conses
2 Page faults
Calls to %EVAL 33
SBCL on the same workstation:
=============================
* (time (almabench:main))
Evaluation took:
32.962 seconds of real time
4.11 seconds of user run time
0.08 seconds of system run time
0 page faults and
0 bytes consed.
--
(espen)