3 ms·
What is Java's startup and JIT overhead? Go seems to be a good replacement for when you need a faster Python. For large, long running programs the JIT probably
by melling 12y ago
What is Java's startup and JIT overhead? Go seems to be a good replacement for when you need a faster Python. For large, long running programs the JIT probably has better optimizations than the current Go compiler.
- pling 12y agoNot only that but it's an easier to find out what is going on inside a JVM versus a static Go binary. It's not all about performance.
- pron 12y agoAbsolutely, but it also has better performance than Go.
- NateDad 12y agoFor some things. For many things they are pretty equivalent. http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=java&data=u64q#faster-programs-measurements http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t... And Java uses a lot more memory, which is what the article was talking about adversely impacting execution speed.
- pling 12y agoIt uses memory differently is probably a better explanation.
- igouy 12y agohttp://benchmarksgame.alioth.debian.org/play.php#whymemory http://benchmarksgame.alioth.debian.org/play.php#whymemory
- waps 12y agoBeating java in memory usage is like beating a tied-up blindfolded turtle you gave cement shoes and dropped into a toxic vat in the 100 meters walking. You know, if the turtle was disqualified ahead of time. Now let's compare how many lines it takes to read in 2 csvs into structs, sort them by their normals and write their vector products out into a new file. I bet java will do < 100 lines and go will be 10 files and > 1000 lines. It'd be about as honest.
- pjmlp 12y ago> What is Java's startup and JIT overhead? Quite fast if you use an AOT compiler. On the server side, it is usually doesn't matter that much. And when it does, there are JVMs that cache JITed code.
- papaf 12y agoThis is true for PC's and servers. However, Java startup time on the Raspberry Pi is horrific. I recently saw a small server go from 3 seconds startup on my PC to 4 minutes on a Raspberry.
- pling 12y agoThat's pretty much because the CPU on the Pi is awful. I mean really bad. The CPU came with the SoC they could get their hands on rather than was selected as being optimal for a desktop/server role.
- igouy 12y ago>What is Java's startup and JIT overhead?< Wouldn't that depend on the program? For a tiny program (meteor contest) that only needs a fraction of a second on a 6 year old quad-core desktop, maybe 99% For a tiny program (nbody) that needs a few tens of seconds on the same machine, maybe 0.4% http://benchmarksgame.alioth.debian.org/play.php#java http://benchmarksgame.alioth.debian.org/play.php#java