Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created December 8, 2009 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swannodette/251463 to your computer and use it in GitHub Desktop.
Save swannodette/251463 to your computer and use it in GitHub Desktop.
; MBP 2.53ghz JDK 1.6 64bit
; ~250ms
(time
(dotimes [x 100000]
(let [[a b c d e f g h i j] (. #" " split "1 2 3 4 5 6 7 8 9 0")])))
; ~150ms
(time
(dotimes [x 100000]
(let [ary (. #" " split " 1 2 3 4 5 6 7 8 9 0")]
(aget ary 0)
(aget ary 1)
(aget ary 3)
(aget ary 4)
(aget ary 5)
(aget ary 6)
(aget ary 7)
(aget ary 8)
(aget ary 9))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment