It's that easy :)
How to Fix Slow Code in Ruby
41–50 of 213 posts
Re: How to Fix Slow Code in Ruby
#42Re: How to Fix Slow Code in Ruby
#43C++ It's that easy :)
Re: How to Fix Slow Code in Ruby
#44Earlier quoted context omitted.
Yes TruffleRuby struggles to run test code because it works against the optimisations we add to make production code fast. For example when you add more profiling to better optimise the hot code it makes the cold code slower, and tests are almost all cold code. Also our C extension emulation layer used to be extraordinarily slow while we made it work correctly, and it's still rather slow. It's a challenge but we're w…
Amazing work and really appreciate all you're doing to better the ecosystem. Question: (a) do you believe we'll ever get to a day when TruffleRuby/Graal will be able to 100% run Ruby on Rails and (b) how much faster over MRI do you believe it could achieve?
For parts of the Ruby ecosystem running production workloads, such as the Liquid template engine, I see 6x performance today. I think that's a realistic goal in time.
Re: How to Fix Slow Code in Ruby
#45Re: How to Fix Slow Code in Ruby
#46Earlier quoted context omitted.
I've seen conflicting benchmarks on this showing different results - possibly has changed over time, or run different comparisons. What you linked seems current at least.
Also keep in mind that as far as performance of dynamic languages goes, all of the P* languages (Perl, Python, PHP, and... Ruby ;)) have been left in the dust by the front-runners (eg Node.js or LuaJIT). Perl used to be king a long time ago, eventually, PHP took pole position, and maybe now it's Ruby's time to shine. But being leader of that particular pack could mean you're nevertheless still 'slow' depending on con…
Re: How to Fix Slow Code in Ruby
#47I wish we could just take Ruby, scrap it, and as a community replace it with Crystal Lang
https://crystal-lang.org/2020/03/03/towards-crystal-1.0.html
Re: How to Fix Slow Code in Ruby
#48It's quite amazing the lengths the companies will go to just to avoid changing their status quo. But for them it makes sense.
---
EDIT: Downvoters, calm down. Ruby on Rails is objectively quite a slow framework and this is proven in many public benchmarks (Techempower included). And Ruby isn't the fastest among the dynamic languages either.
Less cargo culting and more facts, please.
Re: How to Fix Slow Code in Ruby
#49What's current state on GraalVM as it relates to running production Ruby code? From what I understand, it's the fastest VM out there at the moment for Ruby. And yes, it's from Oracle but they have GPL'd the code [2] [1] https://www.graalvm.org [2] https://www.graalvm.org/docs/faq/ Edit: looks like TruffleRuby is built onto of Graal. https://github.com/oracle/truffleruby
Re: How to Fix Slow Code in Ruby
#50Earlier quoted context omitted.
Basically do not use Ruby
Yes, Ruby is meant to be easy and magical, but it was never meant to be fast. It's fast enough for most things, but you also wouldn't show up to a drag race with a tuned bicycle.