[Top][All Lists]

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

Re: [Texmacs-dev] TeXmacs with S7 Scheme

From: TeXmacs
Subject: Re: [Texmacs-dev] TeXmacs with S7 Scheme
Date: Thu, 31 Dec 2020 10:27:37 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Max,

Thanks for your work on S7.  It is interesting that you managed to get that 
although a bit disappointing that there is no performance improvement.

On Wed, Dec 30, 2020 at 11:40:36AM +0100, Massimiliano Gubinelli wrote:
> Hi all,
>  Just to have some comparison metrics in this discussion, I've tried to run 
> this program
> (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))
> (display (fib 40))
> on my machine (MacBook Air 2019) for Guile 1.8, Guile 2.2.7, Guile 3.0.4 and 
> S7, this are the results:
> Guile 1.8.8 : 40.595 sec
> Guile 2.2.7 : 8.102 sec
> Guile 3.0.4 : 3.864 sec
> S7 : 3.297 sec
> The results for Guile2/3 are from the compiled code (excluding the 
> compilation time). If we force Guile2/3 to use only the interpreter (with 
> GUILE_AUTO_COMPILE=0 and clean cache) we have
> Guile 2.2.7: 120 sec
> Guile 3.0.4: 60 sec
> So, S7 seems a quite fast interpreter and also the benchmark shows the 
> situation in Guile-land. For some reason however, our use-case is not fully 
> captured by this benchmark.

It would be interesting to explain the timings.

Could it be that the slowness of S7 for our application is due to
some limited kind of pre-compilation taking place in S7?

The Fibonacci example is so small that you won't notice the overhead
due to precompilation.  For a real world application like TeXmacs,
one of the main bottlenecks is startup time, which basically boils
down to a lot of file loads, parsing and function declarations.
If we would like to make this more efficient, then we would need
some kind of cache for (pre-)compilation.  I guess that this is where
Guile 3 might one day be interesting (modulo all the other drawbacks).

Best wishes, --Joris

reply via email to

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