4 ms·
The JVM startup time is actually negligible. What you're seeing is the time it takes to load the clojure jar.
by flippant 11y ago
The JVM startup time is actually negligible. What you're seeing is the time it takes to load the clojure jar.
- TylerE 11y agoDoes it matter? I don't experience this with nim or go or even python - but it does show up with every jvm language, including clojure.
- pjmlp 11y agoDon't blame the JVM for what it is a Clojure implementation problem. http://blog.ndk.io/jvm-slow-startup.html http://blog.ndk.io/jvm-slow-startup.html http://martinsprogrammingblog.blogspot.de/2012/02/why-is-clojure-so-slow.html http://martinsprogrammingblog.blogspot.de/2012/02/why-is-clo... If you program directly in Java it can be as fast as Nim or Go. Granted, if you want AOT to native code, your only option is a commercial JVM.
- merb 11y agoThis post is really old. Even Scala has improved in startup time. I don't think that numbers from 2012 are reasonable. Especially when Java 1.8 will hit these languages. It reduces build times and startup times since these lanaguages could share their bytecode when it comes to lambda's and such things. With -Xexperimental on Scala 2.11 and changing some things to lambda it will reduce the code size by 10-15% which is a lot in such a big codebase. And I think closure will have such stuff, too. This also means faster startup times. Also Java 9 and Java 10 will also help these languages to improve.
- pjmlp 11y agoSo is Clojure 1.8 performance any better than those numbers? For a long time I played with the idea of using it as common code between Android and Windows Phone, but the performance on Android and outdated CLR support demotivated me to pursue it, so it was back to C++11 (now C++14) for common code.
- merb 11y agoI'm not sure, I don't know how much Clojure 1.8 improved. Currently this will bring a big one: https://github.com/clojure/clojure/blob/master/changes.md#11-direct-linking https://github.com/clojure/clojure/blob/master/changes.md#11... Also Clojure isn't tied to Java 8, it's compatible back to Java 5, so this brings a lot of overhead.
- puredanger 11y agoClojure has required a minimum of Java 6 since Clojure 1.6.
- merb 11y agoStill a lot of old code, and sorry for my misinformation. Java 6 to Java 8 will reduce code size by a order of magnitude. Even Scala will reduce code size and Scala 2.12 is just amazing how good it fits to Java 8. I hope Clojure will do the same. We written a small ERP project and looking forward to have a calculation layer in clojure.