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]

RE: random generators time-critical?


I have used the slib random number generators. They work fine, but are about
50 times slower than my C ones. However, as they are more highly portable,
especially on platforms without dynamic loading,  I have tried to use
identical syntax for the inteface to my loadable c ones. In the particular
application the slib generators used over 70% of the CPU alone; replacing 
them with C was a big win. YMMV.

This seems to me a reasonable principle; when something portable exists
in slib, which one might like to speed up with a C version keep a compatable
interface. Some of  slib seems to be a bit, um, `idiosyncratic', so
I am sure we do not need to follow the principle slavishly.
 
Julian Satchell
<satchell@dera.gov.uk>