[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] benchmarks
From: |
address@hidden |
Subject: |
[Chicken-users] benchmarks |
Date: |
Mon, 24 Nov 2003 14:18:01 +0100 |
There are lies, damned lies and benchmarks, so ...
I was trying to determine the function call overhead, so I wanted to measure
how much it takes to
call a million times a do-nothing function. The answer is ~6 seconds in the
interpreter and
2 seconds in the compiler (on my old PII machine). So, compilation gives a 3x
speedup.
Now, what surprises me is that interpreted mzscheme is as fast a compiled
chicken!
How can it be? Here is my code (yes, I know the while could be coded better,
but it does
not matter in the issue of why mzscheme is so fast (or chicken so slow)):
; 6.539s interpreter
; 2.059s compiler
; 2.2s mzscheme
(define-macro (while c . do)
`(let loop ()
(if (not ,c) 'done (begin ,@do (loop)))))
(define (f) #f) ;; do nothing function
(define N 1000000)
(time
(define i 0)
(while (< i N)
(f)
(set! i (add1 i))))
It could be that I am doing something stupid, it is my first benchmark!
N.B. the -higienic option is on.
Generally speaking, how does chicken performance compare with other Scheme
implementations? (I expect there is a document somewhere ...)
- [Chicken-users] benchmarks,
address@hidden <=