3 ms·
One thing that wasn't touched was JRuby[1], on their site they state high performance and real threading as advantages. If twitter has (some of) the best ruby
by angerman 15y ago
One thing that wasn't touched was JRuby[1], on their site
they state high performance and real threading as advantages.
If twitter has (some of) the best ruby developer (mentioned
somewhere at the end of the video), why have they neglected
JRuby? Why is it no option? For legacy code with native
extensions this makes sense. But is jruby slower, more memory
hungry on the JVM then scala or clojure? I always though that
JRuby was one of the more performant languages on the JVM?
Apart from that it was an interesting talk.
[1]: http://www.jruby.org/ http://www.jruby.org/
- cageface 15y agoJRuby is fast for a Ruby implementation, but it's still far, far slower than Scala or Java itself. http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=jruby&lang2=scala http://shootout.alioth.debian.org/u32/benchmark.php?test=all...
- bad_user 15y agoI do get that a dynamic language like Ruby will always be slower than a language like Java, which has primitives and where many things, including static method calls, are solved at compile time. But citing the Alioth.Debian benchmarks? Really? Dude, take a look at the source-code of those benchmarks sometimes -- they are completely useless ;)
- netghost 15y agoIf you want a fast dynamic language, take a look at Lua. It's surprisingly fast, especially LuaJIT, and pretty straight forward (almost boring really). The main downside is that there isn't the breadth of community around it.
- cppsnob 15y agoLua's threading is just as broken as Python or Ruby. Maybe even more so.
- cageface 15y agoThey show the right order-of-magnitude differences. Taking them more seriously than that is a mistake.
- igouy 15y agoThat JRuby :: Scala URL shows an interquartile range from 6x to 31x so which order-of-magnitude were you going to pick? ;-)
- etherael 15y agoit's still slower than ruby 1.9 is it not? I was under the impression the current perf hierarchy was 1.9.2p290 w / gc cleanup patch (ree inspired) > jruby > 1.8.7 (ree) > all the other rubies?
- igouy 15y agoDude, "completely useless" is just "completely useless" name calling. Say what you think is wrong with the source-code of particular programs.
- code_duck 15y agoThey're as useful as the code is well written for each language. You think the Ruby code could be faster, and thus the comparison is skewed? Go ahead and help everyone understand by improving it.
- kennystone 15y agoA lot of the pain a site like Twitter will have comes from GC (they wrote their own Ruby GC), and JRuby has a much better garbage collector over MRI and probably better than Twitter's.
- vsync 15y agoIt seems like something like Twitter would benefit lots from a good generational GC. Any more info on the one they wrote and how it differs from the built-in one? I'd love to learn more.
- jefft 15y agoI recall reading an interview with Evan Weaver that the problem with moving to JRuby was in client libraries they were using, not JRuby itself.
- kemiller 15y agoThat is indeed the issue if you want to convert an existing rails app to JRuby. But if you're just starting out, it's a different story: you'll end up much more JVM-focused since the best option is generally to use the java equivalent instead of a ruby gem, but there are options. I've been using rails for almost 7 years now (holy crap) and run a medium-sized site on it. It works just fine, but if I were starting from scratch today, I would still use Rails, but I'd run it on JRuby.
- larrywright 15y agoAgreed. There are certainly some people who can't use the JVM for some reason (client libraries being a common one), but I think most people would be best served by using JRuby. There's a lot of innovation going on there, and platforms like Torquebox[1] have some compelling benefits. 1. http://torquebox.org/ http://torquebox.org/