This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-25
Channels
- # admin-announcements (1)
- # aws (1)
- # beginners (52)
- # boot (78)
- # cider (22)
- # cljs-dev (1)
- # cljsrn (6)
- # clojars (23)
- # clojure (51)
- # clojure-austin (2)
- # clojure-china (2)
- # clojure-dusseldorf (2)
- # clojure-russia (101)
- # clojure-sg (2)
- # clojure-uk (2)
- # clojurescript (53)
- # core-logic (14)
- # cursive (1)
- # editors (4)
- # hoplon (324)
- # jaunt (1)
- # juxt (4)
- # leiningen (2)
- # mount (17)
- # off-topic (4)
- # om (15)
- # onyx (15)
- # parinfer (4)
- # proton (5)
- # re-frame (26)
- # reagent (24)
- # ring-swagger (1)
- # slack-help (5)
- # spacemacs (2)
- # untangled (10)
I think I have discovered an interesting optimization: https://github.com/darwin/clojurescript/tree/inline-truth
When @domkm requested proper dead code elimination in cljs-devtools, I got burnt by the need to explicitly specify (if ^boolean js/goog.DEBUG …)
hint to get :closure-defines
working under :advanced build[1]. It was unexpected to me that closure compiler cannot see that optimization and does not inline truth test for js/goog.DEBUG “constant”. So I started poking around and found a way how to aggressively inline checked truth checks in a compatible way (I believe). I also believe this could potentially open optimizations in other places. I think we should explore @nosideeffects
annotation[2] and tag core functions where appropriate.
[1] https://github.com/binaryage/cljs-devtools/releases/tag/v0.5.3
[2] https://developers.google.com/closure/compiler/docs/js-for-compiler?hl=en#tag-nosideeffects