Hacker News new | ask | show | jobs
by erichocean 4968 days ago
Would have been nice if the title was "Twitter survives election after Ruby-to-Scala move", since that's what actually happened.

(They do use a bit of regular Java, but the majority of the core code is Scala, and it's Scala that should be getting the top line credit here, not Java.)

1 comments

No. It is the JVM that should be getting the credit.
If that were the case, they could have just run JRuby and avoided rewriting a bunch of code.

The truth is, Scala is actually helpful with the architecture they came up with AND its great that it runs on the JVM.

I'm not necessarily disagreeing with you (static typed languages are going to be faster on the JVM), but JRuby - partially with the help of invokedynamic, added in Java 7 - has come a long way performance-wise since Twitter began their rewrite.

I wonder if they would have done anything different, had JRuby been where it is now?

JRuby, even when using a lot of Java based libraries, doesn't get you the performance boost you need — it is just incremental over Ruby and even then only with some code.
...except that JRuby is 3-100x slower than Java: http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...
No, JRuby is not 3-100x slower than Java.

Those 10 tiny tiny Ruby programs are 3-100x slower than the Java programs written for the tasks.

Magnetised needles and steady hands.