How to Fix Slow Code in Ruby
engineering.shopify.com
How to Fix Slow Code in Ruby
1–10 of 213 posts
Re: How to Fix Slow Code in Ruby
#2Re: How to Fix Slow Code in Ruby
#3Re: How to Fix Slow Code in Ruby
#4Re: How to Fix Slow Code in Ruby
#5Re: How to Fix Slow Code in Ruby
#6Interesting; Shopify doesn't use TruffleRuby, but instead prefers MRI?
Re: How to Fix Slow Code in Ruby
#7It fundamentally has to be slower. Ruby is the most dynamic of the dynamic programming languages. And the community has embraced metaprogramming, making it every more dynamic. Especially on webservers, you'll be executing hundreds, sometimes thousands, more lines of code than other servers, especially in a mature system.
Is it "slow" enough to matter? Probably not until you get to a medium scale. Everywhere I've worked, we've had to on average double the hardware specs for Ruby servers to make them as performant as other dynamic language applications we run. Not the most expensive thing in the grand scheme of things, but there are entire cottage industries of magically tuning Ruby and Rails that you don't have to worry about with other systems until much larger scales.
Re: How to Fix Slow Code in Ruby
#8Interesting; Shopify doesn't use TruffleRuby, but instead prefers MRI?
Shopify's investing in TruffleRuby as well as MRI - they employ me to work on it. We have it able to run one major app, but still working on making it as fast as we'd like.
Re: How to Fix Slow Code in Ruby
#9Interesting; Shopify doesn't use TruffleRuby, but instead prefers MRI?
Re: How to Fix Slow Code in Ruby
#10Benchmarks are subjective, but all benchmarks show Ruby as slower than compared dynamic languages. The relative speed difference is different per benchmark, but across the board Ruby is slower. It fundamentally has to be slower. Ruby is the most dynamic of the dynamic programming languages. And the community has embraced metaprogramming, making it every more dynamic. Especially on webservers, you'll be executing hund…
If it doesn't bring you that, then we have a problem!