Playing around with Chicken Scheme I tried the harmonize benchmark function I posted about previously. I used the following code: (define (harmonize n)
(do ((i 1 (+ i 1))
(z 0.0 (+ z (/ 1.0 i))))
((> i n) z)))
The result was 2.4 seconds running in interpreted mode and 0.76 seconds when compiled to C code with optimisations turned on. That's pretty good considering there are no type declarations which the Common Lisp and Lush code has the advantage of using.
Chicken Scheme is quite a nice Scheme implementation. It packs a lot of stuff in a small package. The current release of Swig has support for Chicken out of the box. Using it I was able to wrap an external C API for use with Chicken very easily. The generated Scheme code, when compiled to C, was compiled as a shared libary, loadable on demand in the Chicken interpreter and/or compiler.
1:18:45 AM
|