kawa performance
Per Bothner
per@bothner.com
Fri Dec 20 10:36:00 GMT 2002
François Morvillier wrote:
> Hi,
> I'm looking for performance tips for kawa related to
> what type of objects and control structures to use in
> order to get the best performance.
> (define (kawa-loop2 n)
> (let loop ((i <int> n)) (if (> i 0) (loop (- i 1))))
> )
> but they're both far slower than the java version.
This version should potentially be fastest. However, the
current version of Kawa optimizes the subtraction (- i 1),
but doesn't optimize the compare (> i 0).
I might just go ahead and fix this now. The Kawa framework
does make it straightforward to do so - it's just a bit tedious.
But it's something I've wanted to fix for a while.
(I could of course say that for a scripting language
300ms for 1000000 iterations isn't bad - but I do want
to to better than that!)
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Kawa
mailing list