Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
user=> (def nums (int-array (take 10000000 (repeatedly #(rand-int 10000000)))))
user=> (time (last (sort nums)))
"Elapsed time: 22885.585904 msecs"
user=> (time (last (let [r nums] (java.util.Arrays/sort r) r)))
"Elapsed time: 2586.003113 msecs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.