3 ms·
Yes, the benchmark is not scientific or correct or ... It's just to give you an idea of how slow Rails is. And anything in Rails is slow, from templates to Act
by zac23or 4y ago
Yes, the benchmark is not scientific or correct or ...
It's just to give you an idea of how slow Rails is.
And anything in Rails is slow, from templates to ActiveJob.
- Someone 4y ago> It's just to give you an idea of how slow Rails is. IMO, it doesn’t. Your first benchmark mostly hits your memory allocator, the second exercises both ruby and ActiveRecord (a component of Rails), and, I guess, does more (depending on the complexity of your User class) That it takes more time may be because ruby is slow, because ActiveRecord is slow, or because of it doing more. It probably is a bit of each, and may be largely because ActiveRecord is slow, but that benchmark doesn’t tell us that. A fairer benchmark would create a pure ruby class similar to your User class, populate it similar to what ActiveRecord does, and compare timings.
- zac23or 4y agoA better benchmark, with rails in position 131 of 142. https://www.techempower.com/benchmarks/#section=data-r21&test=composite https://www.techempower.com/benchmarks/#section=data-r21&tes...
- Someone 4y agoAgain, that Rails is low in that list doesn’t support your claim “ruby isn’t slow, Rails is”. Pointing out an item a lot higher up on that list that’s also written in ruby and about as easy to use would be a way to support your claim.