5 ms·
How inefficient is Ruby really? This tool surprised me. Can any Ruby-ists chime in? http://therighttool.hammerprinciple.com/statements/programs-written-in-this
by kloncks 15y ago
How inefficient is Ruby really? This tool surprised me. Can any Ruby-ists chime in?
http://therighttool.hammerprinciple.com/statements/programs-written-in-this-language-tend-to-be-effic http://therighttool.hammerprinciple.com/statements/programs-...
- zootm 15y agoThe interpreter in 1.8 and earlier is definitely pretty sluggish; I believe the 1.9 implementation was intended to be quite a lot faster, and JRuby is pretty fast. No idea about Rubinius or IronRuby or other alternative implementations. It's definitely the case that stock Ruby 1.8 is slow for a great many applications, though. Having said that, there's alternatives, and a lot of the time efficiency of execution is not at the forefront of the objectives for systems written in Ruby.
- igouy 15y ago> I believe the 1.9 implementation was intended to be > quite a lot faster, and JRuby is pretty fast. "faster" compared to what? "pretty fast" compared to what?
- rmgraham 15y agoThan 1.8, as per the part you trimmed from your quote..
- zootm 15y agoAs a sibling quote mentioned, 1.9 is fast relative to 1.8. JRuby is pretty fat in general, with the potential to approach Java speed at times, although I think specific things can slow you down a lot. In particular it was the case (not sure if it still is) that exceptions in JRuby were pretty expensive, but many Ruby libraries treat them as cheap, leading to performance problems if you move from one platform to another. I was not trying to be precise though, just give a feel for the different implementations.
- jerf 15y agoIt tends to hang out at the bottom of the Shootout [1]. Its phenomenal cosmic powers come at a price. But note that the ratio of Ruby to Python or Perl is generally within 2x. (The Shootout is not the One True Measure of speed... but it isn't meaningless, either.) Generally the only thing this really means though is that you wouldn't want to do hard-core computation in pure Perl/Ruby/Python, hence things like NumPy. [1]: http://shootout.alioth.debian.org/u64q/which-programming-languages-are-fastest.php http://shootout.alioth.debian.org/u64q/which-programming-lan...