Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


> 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.


This 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.


That'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.


Not 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.


Absolutely, but it also has better performance than Go.


For some things. For many things they are pretty equivalent.

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.


It uses memory differently is probably a better explanation.



Beating 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.


>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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: