6 ms·
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
by extension 14y 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.
- thebluesky 14y agoStatically 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/ http://shootout.alioth.debian.org/
- justincormack 14y agoOnly when they removed LuaJIT from the shootout, it is dynamic and fast (it was around where Java is in the benchmarks).
- thebluesky 14y agoThe 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.
- justincormack 14y agoThats 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.
- nwienert 14y agoHow 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/ http://julialang.org/
- hythloday 14y agoYou 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.
- igouy 14y ago>> 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-fastest.php?calc=chart&ghc=on&csharp=on&go=on&fsharp=on&fpascal=on&ocaml=on&v8=on http://shootout.alioth.debian.org/u64/which-programs-are-fas...