mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
Statically def transducer
Eliminates allocation and friendlier to JIT
This commit is contained in:
parent
59642e51f1
commit
61783e4c81
1 changed files with 3 additions and 1 deletions
|
|
@ -11,9 +11,11 @@
|
|||
[m]
|
||||
(persistent! (reduce-kv keywordize-kv (transient (empty m)) m)))
|
||||
|
||||
(def ^:private keywordize-xf (map -keywordize))
|
||||
|
||||
(defn- -keywordize-default
|
||||
[coll]
|
||||
(into (empty coll) (map -keywordize) coll))
|
||||
(into (empty coll) keywordize-xf coll))
|
||||
|
||||
(doseq [type [clojure.lang.PersistentHashSet
|
||||
clojure.lang.PersistentVector
|
||||
|
|
|
|||
Loading…
Reference in a new issue