4 ms·
While everyone is entitled to their own opinion, I think it is worthwhile to give more detailed examples - like for example slow compared to what? For example
by dimitar 6y ago
While everyone is entitled to their own opinion, I think it is worthwhile to give more detailed examples - like for example slow compared to what?
For example there is a nice discussion over slow startup (note that for the most people the impression that it is slow comes from the Leiningen startup which starts two JVM processes): https://stuartsierra.com/2019/12/21/clojure-start-time-in-2019 https://stuartsierra.com/2019/12/21/clojure-start-time-in-20...
- darksaints 6y agoOkay, here is an example. Let's say you're writing a web app, and you want to stick with the JVM. Pull up with Web App Framework Benchmarks, narrow it down to Java, Kotlin, Scala, and Clojure. Let me know when you have stopped scrolling, cause it takes a while before you see the first Clojure framework. Unfortunately, web apps are probably the thing that Clojure does best, and Clojure is already plenty slow there. Try it out for something typically throughput intensive (like mathematical programming or machine learning), or short lived (like CLI apps), and you'll give up almost immediately.
- capableweb 6y agoThere haven't really been a lot of efforts to get a high-speed web frameworks done in just Clojure as that's not normally how professional Clojure developers work and deploy code. Not a lot of Clojure developers use frameworks in the first place, so the HTTP server ends up being something that gets pulled in as a library, and since it's running on the JVM, you use JVM servers, which are fast. vertx seems to be something that scores high, but unfortunately only the Scala binding seems to be in the benchmark you mentioned. Here's a Clojure alternative: https://github.com/vertx-clojure/vertx https://github.com/vertx-clojure/vertx CLI apps are easily solved with Babashka now.
- fulafel 6y agohttps://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=json https://www.techempower.com/benchmarks/#section=data-r19&hw=... Clojure is on place #20 with a score of 1.3M vs 1.6M of the winner. That's fast enough. More broadly: These kinf of benchmark numbers matter in a pretty small niche of web services and it rarely makes sense to make it a big factor in PL choice.
- darksaints 6y agoLol, a cherry picked benchmark and it's for json using a Jackson wrapper lib. That's some lovely Clojure representation right there.
- macintux 6y agoFrom the HN guidelines: > Be kind. Don't be snarky...Please don't sneer, including at the rest of the community.
- Scarbutt 6y agoThat article is disingenuous, the startup time of "hello world" in Clojure is still pretty bad but tolerable, the issue arises when you start to add libraries, now your web service can take from 1-2 minutes or more to start.