Created
October 27, 2012 10:59
-
-
Save jbrechtel/3964280 to your computer and use it in GitHub Desktop.
nth vs last/take
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clojoomba.core.runner=> (time (count (nth (clojoomba.core.evolution/evolutions {:agents (gen-agents 20) :room-size 10 :num-rooms 10 :steps 200}) 2))) | |
| "Elapsed time: 133.896 msecs" | |
| 20 | |
| clojoomba.core.runner=> (time (count (nth (clojoomba.core.evolution/evolutions {:agents (gen-agents 20) :room-size 10 :num-rooms 10 :steps 200}) 2))) | |
| "Elapsed time: 121.748 msecs" | |
| 20 | |
| clojoomba.core.runner=> (time (count (nth (clojoomba.core.evolution/evolutions {:agents (gen-agents 20) :room-size 10 :num-rooms 10 :steps 200}) 2))) | |
| "Elapsed time: 113.795 msecs" | |
| 20 | |
| clojoomba.core.runner=> (time (count (last (take 2 (clojoomba.core.evolution/evolutions {:agents (gen-agents 20) :room-size 10 :num-rooms 10 :steps 200}))))) | |
| "Elapsed time: 37.522 msecs" | |
| 20 | |
| clojoomba.core.runner=> (time (count (last (take 2 (clojoomba.core.evolution/evolutions {:agents (gen-agents 20) :room-size 10 :num-rooms 10 :steps 200}))))) | |
| "Elapsed time: 39.932 msecs" | |
| 20 | |
| clojoomba.core.runner=> (time (count (last (take 2 (clojoomba.core.evolution/evolutions {:agents (gen-agents 20) :room-size 10 :num-rooms 10 :steps 200}))))) | |
| "Elapsed time: 36.178 msecs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment