Blog 2019/11/2
<- previous | index | next ->
Let's use a trivial (recursive) Fibonacci benchmark to compare the performance of a few Scheme interpreters.
(define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))
(display (fib $n))
(newline)
Specifically, I was interested in looking at start-up time and overall throughput (actually, function-call overhead).
- ๐ Startup time: Elk, Chicken
- ๐ Throughput: Chez, Racket
Overall results:
A close-up of the "knee" of the curve:
If we focus on small values of n
, we can compare start-up time. Here, non-JIT'ed interpreters will perform well.
If we focus on large values of n
, we get a sense of the overall throughput (actually, the function-call overhead) of the interpreters. Here, the JIT'ed interpreters will perform well.
Why not add also Guile 1.8? As far as I know the interpreter there performs better than in the Guile 2 series. Only Guile 3 seems to be finally on par with that. Also s7 scheme ( https://ccrma.stanford.edu/software/snd/snd/s7.html ) is a popular choice for embedding and the author claims is quite fast. It would be interesting to compare these to chibi, for example.