4 ms·
That's not quite it. The client/server distinction was removed from the JVM many years ago. These days the JVM switches between modes on the fly on a per-method
by thu2111 7y ago
That's not quite it. The client/server distinction was removed from the JVM many years ago. These days the JVM switches between modes on the fly on a per-method basis, this is called tiered compilation, so the optimisations are in effect on by default. Back in 2006 yes it may have made a big difference but it wouldn't have made startup magically instant.
IIRC Clojure apps are slow to start because they do a lot of first-time setup work that isn't actually executing user code. It's not so much a JVM problem as a Clojure-emitted-code problem. The GraalVM native-image tool fixes it because it can start an app in a pre-initialised state.
- stingraycharles 7y agoI understand, but either way, the example Rich Hickey used to execute the sample Clojure application in less than a millisecond seems impossible? In other words, if Rich' example is real and recent, what could possibly be the environment in which this worked?
- thu2111 7y agoYeah. Not sure - maybe it dates from a time when clojure was just a toy or prototype or something.