Trivial performance comparison of some Scheme interpreters
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
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.