This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: kawa performance
- From: Per Bothner <per at bothner dot com>
- To: François Morvillier <fmorvill at yahoo dot com>
- Cc: kawa at sources dot redhat dot com
- Date: Wed, 27 Feb 2002 16:52:26 -0800
- Subject: Re: kawa performance
- References: <20020227105502.4095.qmail@web13907.mail.yahoo.com>
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/