[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sabotage against guile users?

From: Ludovic Courtès
Subject: Re: Sabotage against guile users?
Date: Thu, 11 Jul 2013 13:43:25 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Roland Orre <address@hidden> skribis:

> I did a few performance tests, and so far 2.0.9 performs much worse than
> 1.8.8.
> I do not know why, but one simple first test I did was
> (define foo (fac 10000))
> which for guile-1.8.8 has as average around 60 ms but for guile-2.0.9 has as
> average around 212 ms (almost no time in gc in average). I also checked
> by removing libgmp that libgmp was really used. Then I tried to run the
> benchmark-suite which was also quite tedious, as they are not directly
> compatible between 1.8.8 2.0.9, but those tests I succeded to run indicated
> much worse performance, around 10 times slower for 2.0.9. I also checked
> the results 35660 digits, and they were identical.

What that this test really measures the performance of the GC, since
bignums are heap-allocated.  Furthermore, since it’s too short (~100ms
on my machine, of which 2.0’s startup takes ~20ms, and slightly more for
1.8), the measurements are too noisy.

> The fac I used above was defined as:
> (define (fac n)
>   (define (iter n res)
>     (if (> n 1)
>         (iter (1- n) (* n res))
>         res))
>   (iter n 1))

I did these two tests anyway:

  1. Run with ‘guile -q -c '(begin (define (fac n) ...) (fac 10000))’.
     With 1.8.8, it takes ~110ms on average.
     With 2.0.9, it takes ~130ms on average.

  2. Put the definition and call in a file, and run ‘guile -q t.scm’.
     With 1.8.8, it takes ~110ms on average.
     With 2.0.9, it takes ~90ms on average.

For (1), Guile 2.0 uses its evaluator, which is not very efficient.
However, for (2), it first auto-compiles the program to bytecode, and
further runs are clearly faster than with 1.8 (again, a better benchmark
would help, but you get the idea.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]