optimize if-path and selected? for non basic fn case

This commit is contained in:
Nathan Marz 2016-06-06 21:30:14 -04:00
parent f3bf935509
commit 68ac32ef56
2 changed files with 3 additions and 4 deletions

View file

@ -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)
))

View file

@ -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]