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]

kawa performance


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.

One simple example : 
is it possible to approach the performance of this
java loop in kawa?
for(int i=0; i<n; i++); 
[3ms for 1000000 iterations]

I've tried this :
(define (kawa-loop n) 
  (let loop ((i n)) (if (> i 0) (loop (- i 1)))) )
[400ms for 1000000 iterations]

and this :
(define (kawa-loop2 n) 
  (let loop ((i <int> n)) (if (> i 0) (loop (- i 1))))
)
[300ms for 1000000 iterations]

but they're both far slower than the java version.

Thanks.

François

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com


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