This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: kawa performance


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]