This is the mail archive of the guile@sourceware.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: Guile performance (was: xlib binding)


Mikael Djurfeldt <mdj@thalamus.nada.kth.se> writes:

> I made a simple experiment.  The procedure `prime' below computes the
> Nth prime number.  The algorithm is inefficient but I think the code
> has a pretty natural blend of common Scheme program operations.
> The procedure `test' counts the number of times the 100th prime has
> been calculated.

Wow.  I ran the same tests here, and got similar results (though I
don't have the latest guile).  I had no idea SCM was that much faster
now.  It would be interesting to test rscheme in compilation mode too
and then compare that against guile-hobbit (which I've never used).

For grins I also tested stalin (using none of the optimizations that
Siskind recommended last time I was playing with benchmarks since I
couldn't recall them offhand) and got a result of about 15000.  In the
previous case, the extra optimization options added an order of
magnitude or two to performance.

What this tells me is that for some speed critical bits of code, you
should be able to expend substantial computation while calling stalin
functions from guile and still see fairly massive speed improvements.

With that in mind, and since I've been working on g-wrap with Chris,
I've been toying with the idea of trying to come up with a clean
automated way to allow you to specify that certain functions should be
handled by stalin rather than guile/rscheme.  This would only be
allowed for cases where writing the arguments and reading the result
would DTRT.  The stalin "server" code that handles the function call
"requests" would be automatically generated.  I haven't really thought
through all the details yet, but it doesn't seem that hard.

Would anyone else be interested in something like this?

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]