3 ms·
Speed and size would be the two biggest. The start up time of the JVM and the size of the generated executables ( jar files ) make scala not terribly useful fo
by dkhenry 13y ago
Speed and size would be the two biggest.
The start up time of the JVM and the size of the generated executables ( jar files ) make scala not terribly useful for those small programming tasks ( scripting and such )
- pjmlp 13y agoIt is a matter of using the right JVM for the job. Many do allow for AOT compilation, or caching the generated JIT code between invocations. IBM J9 is one of them, for example.
- TylerE 13y agoMy understanding is that the bulk of JVM startup time is NOT compiling or loading the actual application code, but loading the classpath.
- pjmlp 13y agoAs I said, not all JVMs are made alike, don't confuse Java virtual machines, with Oracle's or OpenJDK implementation. JVMs that cache JITed code don't spend time loading the classpath if the cache is still valid.
- TylerE 13y agoYou misunderstand me...it has to read and decompress (jars are basically zip files) those 50MB are so (just for the system jars) on every startup before it can even think about validating the cache
- pjmlp 13y agoSure, however you are still speaking of a specific implementation.
- TylerE 13y agoAnd which implementation that you seem to imply exists DOESN'T suffer from this seemingly fundamental issue? You built this strawman, now defend it or stop waving your hands.
- pjmlp 13y agoJust read my OP carefully and you will find you answer.
- TylerE 13y agoNo, read MINE carefully. Even loading cached data isn't free.
- pjmlp 13y agoOf course not, all the code and data that go into the processor needs to go through the processor cache first. My OP comment has an example of a JVM that doesn't read jar files as you mentioned, while executing native code stored in a JIT cache present in the hard disk, between invocations. Google is your friend if you look for the respective documentation. Or, who knows, you could even download it and play around with it. I'm out, please turn the lights off on the way out.