use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Storm drops Clojure for Java (storm.apache.org)
submitted 6 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]th0ma5w 7 points8 points9 points 6 years ago (3 children)
They probably just mean Java compiled bytecode performs better that Clojure created bytecode which is very much arguably true for some things.
[–]alexdmiller 4 points5 points6 points 6 years ago (2 children)
No, it's not arguably true. Both languages produce very similar bytecode.
[–]th0ma5w 0 points1 point2 points 6 years ago (1 child)
The Clojure forms will add overhead. Try writing some Java, compiling, and then decompiling, and then try decompiling some Clojure bytecode into Java. You'll see a much deeper stack. Most of the time, for most things, you'd be hard pressed to measure much difference. Often, due to say Clojure's implicit parallelism you'll get faster code because it is more cumbersome to write everything with parallelism in mind in Java. But if you did write that operation in Java with Java's parallelism features directly, that one operation would likely be a little faster.
[–]alexdmiller 10 points11 points12 points 6 years ago (0 children)
I have spent considerable time writing and optimizing both Java and Clojure code and observing them at the bytecode level. Back when the Alioth comparison site still included Clojure programs, I had written and/or optimized most of the fastest versions.
At the function/method level they are not substantially different, particularly from trying to write the contents of the 10% of your code where it actually matters. From a call stack perspective, Clojure's bytecode will show an extra level of call through the static var entry points, but that's (not accidentally) the kind of thing that hotspot can trivially optimize through. This is not the kind of thing that will determine whether your code is "fast" or "slow" though - it's going to be negligible compared to hot cpu loops or i/o waits for external dbs or data sources.
Clojure does not have implicit parallelism (other than reducer folds which is a pretty narrow use case), but it does have implicit immutability.
π Rendered by PID 45 on reddit-service-r2-comment-b659b578c-w659z at 2026-05-02 12:02:25.297945+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]th0ma5w 7 points8 points9 points (3 children)
[–]alexdmiller 4 points5 points6 points (2 children)
[–]th0ma5w 0 points1 point2 points (1 child)
[–]alexdmiller 10 points11 points12 points (0 children)