update readme

This commit is contained in:
Nathan Marz 2016-08-15 06:11:04 -04:00
parent 21f117503e
commit a765d1af50

View file

@ -44,18 +44,18 @@ Example 2: Increment every even number nested within map of vector of maps
**Specter is much faster than Clojure's limited built-in alternatives** **Specter is much faster than Clojure's limited built-in alternatives**
Example 1: Specter's `select` is 27% faster than `get-in`: Example 1: Specter's `select-any` is 30% faster than `get-in`:
```clojure ```clojure
(time (time
(dotimes [_ 10000000] (dotimes [_ 10000000]
(get-in {:a {:b {:c 1}}} [:a :b :c]))) (get-in {:a {:b {:c 1}}} [:a :b :c])))
"Elapsed time: 640.666 msecs" "Elapsed time: 604.618 msecs"
(time (time
(dotimes [_ 10000000] (dotimes [_ 10000000]
(select [:a :b :c] {:a {:b {:c 1}}}))) (select-any [:a :b :c] {:a {:b {:c 1}}})))
"Elapsed time: 470.167 msecs" "Elapsed time: 427.528 msecs"
``` ```
Example 2: Specter's `transform` is 6x faster than `update-in`: Example 2: Specter's `transform` is 6x faster than `update-in`:
@ -69,7 +69,7 @@ Example 2: Specter's `transform` is 6x faster than `update-in`:
(time (time
(dotimes [_ 10000000] (dotimes [_ 10000000]
(transform [:a :b :c] inc {:a {:b {:c 1}}}))) (transform [:a :b :c] inc {:a {:b {:c 1}}})))
"Elapsed time: 1699.016 msecs" "Elapsed time: 1616.762 msecs"
``` ```
**Specter makes sophisticated tasks that are difficult to program manually easy** **Specter makes sophisticated tasks that are difficult to program manually easy**