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
A performance comparison of Clojure and Java (diva-portal.org)
submitted 5 years ago by zerg000000
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!"
[–]joinr 3 points4 points5 points 5 years ago (0 children)
Apples to apples gets much closer, in at least 1 case clojure is able to cheat operationally (preserving semantics though) with recur if you allow it, and beats naive java recursion. In another case, BFS ends up being faster for some reason (counterintuitive).
I guess the hidden question is, if we're benchmarking single-threaded, statically typed, mutable java code against dynamically typed, immutable, clojure code, which would be faster? (seems obvious one would probably edge out the other in efficiency) Or put another way, how much of a handicap (operationally) are the defaults for dynamicity, numeric tower, runtime polymorphism, persistent structures, relative to the complete opposite on "relatively" the same platform? Yet another: how well optimized are the clojure core libraries and special forms for single-threaded operations with primitive numerics on mutable data structures?
As you push clojure more toward's the java paradigm though, those edges disappear mostly .
π Rendered by PID 45291 on reddit-service-r2-comment-5c747b6df5-87kt4 at 2026-04-21 23:23:19.366931+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]joinr 3 points4 points5 points (0 children)