This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-25
Channels
- # announcements (1)
- # beginners (131)
- # cljs-dev (1)
- # clojure (178)
- # clojure-argentina (1)
- # clojure-dev (3)
- # clojure-uk (2)
- # clojuredesign-podcast (1)
- # clojurescript (16)
- # code-reviews (2)
- # core-async (2)
- # emacs (28)
- # figwheel-main (19)
- # fulcro (11)
- # kaocha (1)
- # leiningen (4)
- # music (6)
- # off-topic (2)
- # re-frame (2)
- # reitit (6)
- # rewrite-clj (9)
- # shadow-cljs (78)
- # slack-help (6)
https://bugs.openjdk.java.net/browse/JDK-8223051
@andy.fingerhut
HotSpot doesn't currently perform useful optimizations on loops with a long
trip count
That's a good point but I don't see how this explains the observed performance difference. Isn't the loop variable long
in both cases (as Andy observed)?
Yeah, I do not think that fact fully explains what is going on. I have hacked Clojure to allow an int primitive loop variable, and JIT can compile it to even slower code than the first iteration faster version with a long (but still faster than the 2nd and later iterations)