Hacker News new | ask | show | jobs
by extension 4965 days ago
Java probably outperforms JRuby primarily because the JVM was designed and tuned to run Java.

But in any case, if Twitter's architecture is truly scalable then any intrinsic slowness of the language shouldn't be a big problem, because they can just toss more hardware in to compensate. What is a problem is a buggy VM that leaks memory. To run thousands of instances in a heavily instrumented way, the VM must be stable and predictable.

1 comments

Statically vs dynamically typed peformance difference is clear for virtually any static or dynamic language you care to name, it has nothing to do with the jvm being "tuned" for a language: http://shootout.alioth.debian.org/
>> peformance difference is clear for virtually any static or dynamic language you care to name <<

JavaScript

http://shootout.alioth.debian.org/u64/which-programs-are-fas...

Only when they removed LuaJIT from the shootout, it is dynamic and fast (it was around where Java is in the benchmarks).
The LuaJIT performance is pretty impressive for a dynamically typed language, but it's hard to deny the fact that mainstream dynamically typed languages our outperformed by their static counterparts.
Thats partly because they were not designed for performance. Lua of course was as it was designed partly for slow small systems. But pypy is getting on pretty well too and javascript, showing what you can do even if not designed for performance.
How does that explain Julia[0]/Node.js? Both within 1-2x speed of C, I think static has less to do with it than you think.

[0] http://julialang.org/

You pretty much have to enforce static type invariants (e.g. "this variable will never be other than an int") to JIT stuff performantly. I don't think that's a point against the GP's argument at all.