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 - cal
It's slow because it has to use reflection to determine the type.
Use (set! *warn-on-reflection* true) and you'll see the warning.
Try something like this and you'll see significantly faster results:
(let [#^testType t (new testType 1 2 3)]
(time (dotimes [_ 1000] (.a t)))
Harvey
--
"You'
> (defn rotate [n s]
> (let [[front back] (split-at (mod n (count s)) s)]
> (concat back front)))
Don't forget (mod n 0) is an ArithmeticException.
Harvey
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju