With 1.2:

(set! *warn-on-reflection* true)
(time (amap an-array idx ret (+ (int 1) (aget an-array idx))))
Reflection warning, NO_SOURCE_PATH:52 - call to aclone can't be resolved.
Reflection warning, NO_SOURCE_PATH:52 - call to alength can't be resolved.
Reflection warning, NO_SOURCE_PATH:52 - call to aget can't be resolved.
Reflection warning, NO_SOURCE_PATH:52 - call to aset can't be resolved.
"Elapsed time: 2663.612 msecs"

Type hinting the arrays:
(time (amap ^ints an-array idx ret (+ (int 1) (aget ^ints an-array idx))))
"Elapsed time: 11.443 msecs"

Whenever you see unusually slow performance reflection is frequently the
cause.
Not sure about the 1.1/1.2 performance though.

Harvey
-- 
"You're keeping me alive because you don't know DOS?"
Izzy, Prophecy II

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to