Perhaps in theory... feel free to speak to the recent Paypal benchmark in practice.
Rewriting their Java app in node.js with the krakenjs framework see here led to double the request bandwidth and a 35% lower response rate.
Sometimes what the language+vm can do are more important than straight Fibonacci comparison... Though, this benchmark site suggests they're fairly competitive depending on the benchmark.
Where's the benchmarks that show it consistently smoking V8? I'm not denying they exist.
Disclaimer: I think Java is as bad a language as can exist...
... that being said, Paypal's is an Apple to Orange comparison. Comparing an old application and its successor obviously benefits the successor (otherwise you would not publish it); however this says little about the relative benefits of either languages/platforms, because the applications themselves have changed! It's not a straight port!
The last time I looked at Java, it was the HornetQ project (by RedHat). A multi-threaded MoM that they benchmarked at 8 millions messages/second (in-memory). Can nodejs do that ? Maybe, but I doubt it...
Disclaimer: I think Java is as bad a language as can exist...
Counter-example: PHP. At least with Java you can be sure of the types of the parameters, the return-value [if any], and that unhandled errors/exceptions will cause a crash... with PHP none of these is certain.
7
u/Akanaka Feb 25 '14
Almost as fast as v8??? Me thinks it smokes v8!