This is the mail archive of the guile@cygnus.com mailing list for the guile project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hello all,
obviously it depends on your application, but I wrote my first
non-trival (i.e. neither fib nor fact) Scheme program to simulate part
of a communication system. I think SLIB's random:normal pretty much
dominated the run time. I rewrote the thing in C++ (which took longer
than to write the Scheme program--this should tell you something about
C++ (or me, I suffered from C++ a year before I did this) 8-( ) and it
ran about 36 times faster which meant 720 CPU hours on a Sparc 5
instead of 1080 days.
The comparison is not entirely fair since we compare SLIB's
random:normal with libg++'s ACG. I did not have as much time to
investigate this as I would have liked, but I tried to use different
Scheme implementations and had lot of fun (for a supposedly R4RS +
SLIB program):
RScheme does not have complex numbers
MzScheme does not like local defines, trig functions don't handle
complex numbers
Hobbit stumbled over the documentation strings, local defines and to
be really effective, one needs to compile SLIB (2a6) random (which
uses bignums) [Has anyone tried to compile (parts of) SLIB?]
SCM was faster (but not much) than Guile at the time (Jun 1997)
On a Sparc 2, (random:normal) takes about 1.4 ms, gennor() from
netlib ranlib.c takes some 16 us. Again, this is a different
generator, but it looks good to me.
10 years ago I read in CLtL1 that a Common Lisp compiler produced
numerical code which was as fast (or faster) than code produced by a
Fortran compiler. When I'll find the time, I will try some more
Scheme (and maybe CL) compilers.
HTH
Roland
P.S. Could anybody tell me the magic incantation (tag) for CVS to get
the release (I did a update a few days ago and (version) => 1.2.91)?