Hacker News new | ask | show | jobs
by ksec 902 days ago
If you compare pure Ruby without Rails to fast language like Rust, Go and Java. It is probably closer to 10-20x.

The 100x to 200x mainly comes from Rails.

1 comments

Can we stop with these useless comparisons? 10x-20x, 100x, 200x out of context means absolutely nothing.

All these micro-benchmarks shootouts means nothing either. Is anyone running a mandelbrot or pi-digits SaaS company? I'd think not.

Similarly saying Rails is slow out of context, means nothing, Rails is "slower" than Ruby micro-frameworks X because it does useful things the other doesn't like CSRF protection etc. If you don't need these features, turn them off and Rails will be about as fast as these frameworks.

If anything annoys me more than clueless people shitting on Ruby for bad reasons it's Rubyists spreading FUD about Rails.

Perhaps it's misleading to throw around specific numbers like 100x, but Ruby is certainly orders of magnitude slower than languages like Go or Java. Both of which are not exactly known for their speed (compared to C++ or Julia, for example).
"speed" thrown without context is meaningless. It's one property of a tool among many others you generally have to trade for.

Some use cases with small margins call for the utmost efficiency to be viable business. Some use cases just need decent efficiency and are happy to trade some efficiency for some other properties.

Many successful people and companies are happy with Ruby, can we just give them a break? Or is there somehow some moral duty to use the "fastest" language available regardless of whether it makes any kind of business sense that nobody told me about?

On the other hand, why is it wrong to say Ruby or Rails is slow? Especially in the context of Java or Go? What is wrong with accepting a simple ground truth that is compiled language is and will always be faster than an interrupted language, even with JIT.

For Rails I often compare to it another CRUD app, StackExchange [1] using ASP.net And the easiest real world comparison with Rails App would be Cookpad. Are we not seeing at least 10x difference if not more.

Is Rails fast enough? That depends on the context. Everyone's business model is different. It is almost definitely fast enough for most SaaS cases.

[1] https://stackexchange.com/performance

> What is wrong with accepting a simple ground truth

Where am I denying that? Saying that one of the most dynamic language is slower than Java or Go it's such a truism it's pointless.

What annoys me is the figures quoted. I can craft you benchmarks were Ruby is barely any slower than these two, or benchmark where it's 1000x slower. So which is the correct number to quote?

> For Rails I often compare to it another CRUD app, StackExchange [1] using ASP.net

This makes zero sense. You said:

> If you compare pure Ruby without Rails to fast language like Rust, Go and Java. It is probably closer to 10-20x.

> The 100x to 200x mainly comes from Rails.

So somehow you are blaming Rails for making Ruby 10 times slower whatever that means. That is a stupid statement that you took out of your hats and that doesn't reflect any reality. Please stop doing that, it's really unnerving for the people who maintain these projects.

>So somehow you are blaming Rails for making Ruby 10 times slower whatever that means.

>That is a stupid statement that you took out of your hats and that doesn't reflect any reality.

I will leave it at that.