[plt-scheme] Re: Using PLT Scheme libs elsewhere?
On May 21, Dimitris Vyzovitis wrote:
> On Mon, 21 May 2007, Danny Yoo wrote:
>
> > I didn't want to guess on this one. I applied the PLT profiler on
> > this program (and including an inlined copy of the md5 library so
> > the profiler could look through it.)
> >
> > The dominating factor here is the 32-bit word arithmetic within
> > the loop in step4 of the md5 algorithm. A good third or so of the
> > total runtime appears to be spent doing "word+=!", one of the
> > private functions in the module that simulates a 32-bit word
> > arithmetic operation.
> ...
> > You've highlighted that the performance might need to be tuned up
> > a bit, so maybe someone can take a look to see if it's possible to
> > make the word arithmetic faster.
>
> The fixnum primitives should be fast, but they only work on 31-bit
> nums (on 32-bit archs). So this might be from words being bignums.
The Scheme code does not use bignums -- it represents 32-bit integers
as a pair of 16-bit ints. And there should be very little allocation
when using it -- it uses mutation instead of allocation.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!