3 ms·
No one disputes that Ruby is slow. But you picking “mirrors” in your analogy makes it sounds like a premature optimization. The reason why perf isn’t typical
by alberth 3y ago
No one disputes that Ruby is slow.
But you picking “mirrors” in your analogy makes it sounds like a premature optimization.
The reason why perf isn’t typically an issue with Rails is the design pattern is to leverage heavy caching.
The use of caching is to address the slowness of Ruby.
- lloeki 3y agoThe two major areas where caching is used in Rails are: - database queries - template rendering First one because round trip to db + running the query + allocating ORM result objects that otherwise get thrown away. Second one because allocating a ton of strings that get join'd and thrown away. > No one disputes that Ruby is slow. I am, because the blanket statement doesn't make sense without context. Also that view is largely biased by the typical assumption that Ruby == Rails.
- alberth 3y ago> "Also that view is largely biased by the typical assumption that Ruby == Rails." Given that the predominate / vast majority use case for Ruby is for web development and Rails being the dominate Ruby web framework ... it's a fair assumption & characterization for people to make that the Ruby == Rails use case.
- karmakaze 3y agoWell objectively, one could say both Ruby and RoR are slow. The first via The Computer Language Benchmarks Game[0], and the latter via TechEmpower Web Frameworks Benchmarks[1]. In practice though the database is doing most of the work, most of the time so is typically slower than both. [0] https://en.wikipedia.org/wiki/The_Computer_Language_Benchmarks_Game https://en.wikipedia.org/wiki/The_Computer_Language_Benchmar... [1] https://www.techempower.com/benchmarks https://www.techempower.com/benchmarks
- igouy 3y agoRuby without Rails — https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...