4 ms·
JVM is not to blame here, it's Clojure that takes a while to load and initialize. Java actually crushes Python in every aspect in terms of performance (which is
by keymone 6y ago
JVM is not to blame here, it's Clojure that takes a while to load and initialize. Java actually crushes Python in every aspect in terms of performance (which is to be expected of statically typed language).
- lvh 6y agoGP specifically mentioned startup time. It's true that most of the startup time for Clojure projects is a Clojure-specific interplay of things the JVM does (but also not language-intrinsic: ClojureScript on V8 does not share that problem, for example), but default flags CPython still beats default flags OpenJDK for "start and do nothing".
- keymone 6y ago> default flags CPython still beats default flags OpenJDK for "start and do nothing" i stand corrected :)
- dnautics 6y agoit's not the static typing that makes a difference, it's the compilation. As an extreme example, asm is very much not statically typed (hell it's not even considered typed in most circles), and it beats the pants off of Java. As another, less flippant, example, Julia will typically beat Java in most long-running algorithms (but probably not time-to-first-x), because it doesn't have a well-optimized-for-compilation-speed compiler, but it does have a better-optimized-for-running-speed compiler for many scientific tasks. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/julia.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 6y agoIn that example, Julia also has someone who's spent many many hours writing and re-writing those few tiny programs to tune performance.