hraberg/shen.clj — pull request #1 by AlexBaranosky (2013-01-23 11:12:38+00:00)
Title: cond/case & ^:const

* ^:const is ever so slightly faster then no ^:const
* cond/case are faster than condp:

user=> (time (dotimes [i 100000] (condp = i 1 2 3 4 5 6 7 8 9)))
"Elapsed time: 36.561 msecs"
nil
user=> (time (dotimes [i 100000] (case i 1 2 3 4 5 6 7 8 9)))
"Elapsed time: 2.331 msecs"
nil
user=> (time (dotimes [i 100000] (cond (= i 1) 2 (= i 3) 4 (= i 5) 6 (= i 7) 8 :else 9)))
"Elapsed time: 2.309 msecs"