CMU CL's Alien interface is way too slow!

Thomas Fischbacher tf@another.gun.de
Sun, 20 Jul 1997 18:46:43 +0200


Maybe I've overseen some important detail, but as far as I can judge, CMU
CL's "alien interface" for handling C code is _way_ too slow to be of any
use. Just have a look at the following session: I simply create an alien
32-bit-word and then successively assign 100 different integers to it.
Machine: Linux on AMD K5/133.

* (defparameter ali (make-alien integer))

ALI
* ali

#<Alien (* (SIGNED 32)) at #x08061FF0>
* (time (dotimes (j 100 nil) (setf (deref ali) (the fixnum j))))
Compiling LAMBDA NIL: 
Compiling Top-Level Form: 
[GC threshold exceeded with 2,000,384 bytes in use.  Commencing GC.]
[GC completed with 1,058,304 bytes retained and 942,080 bytes freed.]
[GC will next occur when at least 3,058,304 bytes are in use.]
[GC threshold exceeded with 3,058,688 bytes in use.  Commencing GC.]
[GC completed with 2,151,936 bytes retained and 906,752 bytes freed.]
[GC will next occur when at least 4,151,936 bytes are in use.]

Evaluation took:
  5.97 seconds of real time
  3.05 seconds of user run time
  0.71 seconds of system run time
  [Run times include 2.49 seconds GC run time]
  2645 page faults and
  3900416 bytes consed.
NIL
* (quit)

As one might guess, Allegro is _magnitudes_ faster!


Since a good alien interface is absolutely vital for us, is there
anything we can do here?


--
regards,

 Thomas Fischbacher                                      tf@another.gun.de