This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-21
Channels
- # aws-lambda (12)
- # beginners (20)
- # boot (1)
- # clara (15)
- # clojure (17)
- # clojure-dev (6)
- # clojure-greece (4)
- # clojure-russia (4)
- # clojure-spec (27)
- # clojure-uk (3)
- # clojurescript (22)
- # cursive (1)
- # data-science (3)
- # datomic (4)
- # fulcro (2)
- # juxt (2)
- # leiningen (2)
- # lumo (19)
- # protorepl (13)
- # re-frame (42)
- # reagent (5)
- # ring-swagger (1)
- # shadow-cljs (89)
- # spacemacs (1)
- # uncomplicate (3)
Hi. Is there a perf suite for the Clojure internals? I’m trying to learn how to write fast libraries for Clojure, and now looking for quick wins on the Clojure core itself.
looking at https://dev.clojure.org/jira/browse/CLJ-1517, not sure if the microbenchmarks are showing the real thing.
One quick win would be to make destructuring less costly. Current:
(defrecord XY [x y])
(def a-map {:x 1, :y 2})
(def a-record (map->XY a-map))
;; 59ns
(cc/quick-bench
(let [{:keys [x y]} a-map]
[x y]))
;; 61ns
(cc/quick-bench
(let [{:keys [x y]} a-record]
[x y]))