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

Sorry, but this is textbook.

Go ahead and run some code on V8 and the equivalent Java.

You'll notice V8 is 'extremely fast' at getting up and running, while Java takes quite some time - often thousands of iterations of a specific bit of code before it optimises.




Oi Vei, I literally said 'fast at getting up and going' and 'over time Java is more optimised'.

Those tests ultimately measure 'peak performance'.

Java takes much longer to reach that level than V8.

Given the fact that a lot of software does not run for a long period of time, and especially UI/Web code (and possibly serverless), the net result is that V8 is basically faster. It gets too near 100% performance after 1 or 2 iterations. Java takes 1000's of iterations.

For many applications, the 'advantage of being fast soon' considerably outweighs any kind of incremental performance benefit that Java might offer over time.

This is mostly true for UI software.

V8 'is fairly quick, and right away'. Java is 'sticky and slow for a bit, and then a bit faster over time but it's not noticeable'.

V8 is a regular car: stops and starts as needed. Java is a race-track stock car - accelerates up to a high speed and stays there. You don't need a race-track car to do food delivery, because the added peak performance is pointless.


You "literally said" so much, but not anything specific that you've measured and others could measure.




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

Search: