force ALL on lists to realize lazy sequence, fix benchmark
This commit is contained in:
parent
a113946076
commit
ee56ddc1ab
3 changed files with 4 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
* Add `satisfies-protpath?`
|
||||
* Inline cache vars are marked private so as not to interfere with tooling
|
||||
* Improve performance of ALL transform on lists by 7x
|
||||
* Improve performance of `ALL` transform on lists by 20%
|
||||
* Bug fix: Using `pred` no longer inserts unecessary `coerce-nav` call at callsite
|
||||
* Bug fix: Dynamic navs in argument position to another nav now properly expanded and compiled
|
||||
* Bug fix: Dynamic parameters nested inside data structures as arguments are now compiled correctly by inline compiler
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
(println "\n********************************\n"))))
|
||||
|
||||
(defn specter-dynamic-nested-get [data a b c]
|
||||
(select-any [(keypath a) (keypath b) (keypath c)] data))
|
||||
(select-any (keypath a b c) data))
|
||||
|
||||
|
||||
(defn get-k [k] (fn [m next] (next (get m k))))
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
(let [data '(1 2 3 4 5)]
|
||||
(run-benchmark "transform values of a list" 500000
|
||||
(transform ALL inc data)
|
||||
(sequence (map inc) data)
|
||||
(doall (sequence (map inc) data))
|
||||
(reverse (into '() (map inc) data))
|
||||
))
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
|
||||
(defn- all-transform-list [structure next-fn]
|
||||
(sequence (comp (map next-fn) (filter not-NONE?)) structure))
|
||||
(doall (sequence (comp (map next-fn) (filter not-NONE?)) structure)))
|
||||
|
||||
(extend-protocol AllTransformProtocol
|
||||
nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue