public
anonymous / gist:2397842
Created

  • Download Gist
gistfile1.clj
Clojure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(def xs (long-array (range 1000000)))
(def ys (long-array (range 1000000)))
 
(defn m [xs ys]
(let [z 3]
(loop [i (- (count xs) 1)]
(aset #^longs ys i (* z (aget #^longs xs i)))
(cond (> i 0)
(recur (unchecked-dec i))
)
)
)
)
 
(report-result (bench (m xs ys)) :verbose)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.