optimize if-path and selected? for non basic fn case
This commit is contained in:
parent
f3bf935509
commit
68ac32ef56
2 changed files with 3 additions and 4 deletions
|
|
@ -52,7 +52,6 @@
|
|||
)))
|
||||
|
||||
|
||||
|
||||
(let [data {:a {:b {:c 1}}}
|
||||
p (comp-paths :a :b :c)]
|
||||
(run-benchmark "get value in nested map" 10000000
|
||||
|
|
@ -92,7 +91,7 @@
|
|||
(run-benchmark "filter a sequence" 1000000
|
||||
(doall (filter even? data))
|
||||
(select [ALL even?] data)
|
||||
(select-first (filterer even?) data)
|
||||
(select-any (filterer even?) data)
|
||||
))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -668,8 +668,8 @@
|
|||
(defn not-selected?*
|
||||
[compiled-path structure]
|
||||
(->> structure
|
||||
(compiled-select* compiled-path)
|
||||
empty?))
|
||||
(compiled-select-any* compiled-path)
|
||||
(kw-identical? NONE)))
|
||||
|
||||
(defn selected?*
|
||||
[compiled-path structure]
|
||||
|
|
|
|||
Loading…
Reference in a new issue