Fork me on GitHub
Ben Sless13:03:46

Any chance for a look at The overhead of keywordizing the keys can be larger than any other component in the server 😿

💯 2
Ben Sless13:03:59

Also found out how to compose binary functions, which would enable compiling the request coercers:

(defn compile-coerce-request [coercers]
   (fn [f-acc k coercer]
     (let [f (fn assoc-coercered [acc request]
               (impl/fast-assoc acc k (coercer request)))]
       (fn comp-coercsion [acc request]
         (let [ret (f-acc acc request)]
           (f ret request)))))
   (fn [acc _request] {})

  {:a #(inc (get % :x))
   :b #(dec (get % :y))
   :c #(dec (get % :z))
 {:x 1 :y 2 :z 3})