Prismatic/plumbing — pull request #13 by codyrioux (2013-10-30 20:16:23+00:00)
Title: Implemented a type-specific performance enhancement on map-vals.

I've used very type specific conditionals to get the most common case (map-vals on unsorted clojure maps) to be the first in comparison list -- as a result runtimes compared to the old function (pre #11) are nearly identical. I left the `map?` check as the third condition to handle the situation in which someone is using an alternate collection that implements `clojure.lang.IPersistentMap`.

```clojure
user=> (def my-map {:a 1 :b 1 :c 1 :d 1 :e 1})
#'user/my-map
user=> (do (bench (map-vals-old inc my-map)) (bench (map-vals2 inc my-map)))
Evaluation count : 233065740 in 60 samples of 3884429 calls.
Execution time mean : 252.555845 ns
Execution time std-deviation : 0.267249 ns
Execution time lower quantile : 251.962102 ns ( 2.5%)
Execution time upper quantile : 252.977565 ns (97.5%)
Overhead used : 5.008290 ns

Found 1 outliers in 60 samples (1.6667 %)
low-severe 1 (1.6667 %)
Variance from outliers : 1.6389 % Variance is slightly inflated by outliers
Evaluation count : 233619540 in 60 samples of 3893659 calls.
Execution time mean : 252.550144 ns
Execution time std-deviation : 0.199572 ns
Execution time lower quantile : 252.148881 ns ( 2.5%)
Execution time upper quantile : 252.965119 ns (97.5%)
Overhead used : 5.008290 ns

Found 3 outliers in 60 samples (5.0000 %)
low-severe 1 (1.6667 %)
low-mild 2 (3.3333 %)
Variance from outliers : 1.6389 % Variance is slightly inflated by outliers
nil
```