# Re: How to speed up ruby and make it as fast as possible

**URL:** <https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458>\
**Category:** Ruby\
**Created:** [July 14, 2006, 9:10pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458 "2006-07-14T21:10:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 9:10pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/1 "2006-07-14T21:10:12Z")

</div>

You are mistaken. Current, stable Perl and Python releases typically  
execute programs much faster than Ruby. I suspected such rationalizing  
and hostile replies in my initial post.

Jamal

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 9:43pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/2 "2006-07-14T21:43:31Z")

</div>

From: “Jamal M.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> You are mistaken. Current, stable Perl and Python releases typically  
> execute programs much faster than Ruby. I suspected such rationalizing  
> and hostile replies in my initial post.

I’m jumping into the middle of the thread, but, I do believe  
you’re missing a few important points.

1. Most of us are already aware of ruby’s speed.

2. Probably anyone here will agree with the idea that  
it would be _nice_ for ruby to be faster, provided  
we don’t have to change the language to get the speed.

Did I leave anything out?

As I mentioned, ruby is _already_ fast enough for some  
applications, and _will never be_ fast enough for others.

Regards,

Bill

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:03pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/3 "2006-07-14T22:03:26Z")

</div>

There are certain sore spots in language discussions which tend to get  
feathers ruffled. Seeing this thread has garnered so many replies in  
such short time uncovers a sore spot in Ruby language discussion. Ruby  
tends to be slower than other similar interpreted scripting languages.  
Although some folks won’t admit it as a broad generalization this  
assertion tends to be stereotypically correct.

Every language has its sore spot. For Python try bringing up  
significant whitepace or passing the understood ‘self’ around each and  
every method. For Java try bringing up the truth of ‘write once run  
everyone’ or mixing primitives in with objects for a supposedly OO  
language. For Perl try bringing up cryptic lack of readibility and  
“bolted on” version updates. For PHP try bringing up secure coding  
practices. And so on…

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/4 "2006-07-14T22:07:16Z")

</div>

Bill K. wrote:

> Did I leave anything out?

Just because you asked: yes.

> As I mentioned, ruby is _already_ fast enough for some  
> applications, and _will never be_ fast enough for others.

There would be even more applications ruby would be fast  
enough for if ruby would just be a little bit faster.

I don’t get the problem with someone who wishes ruby to  
be even better (yes, that means faster this time, performance  
is one quality of software, along with a lot of others)  
than it already is.

> Regards,
> 
> Bill

cheers

Simon

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:24pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/5 "2006-07-14T22:24:22Z")

</div>

Jeremy T. wrote:

> Instead of bitching about these things

Someone asked:

“Is there a ruby configuration file that I can change to help speed  
ruby up and take as much resources as it needs?”

The answer is probably: no.

But we have a holy war here.

I don’t get it.

cheers

Simon

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:31pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/6 "2006-07-14T22:31:49Z")

</div>

From: “Simon Kröger” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> enough for if ruby would just be a little bit faster.  
> Yes… but the reason I stated it in terms of limits,  
> was to show that what you’re saying will always be true.

No matter how fast ruby gets, there will always be even  
more applications ruby would be fast enough for if ruby  
would just be a little bit faster. (Although, as  
programmers, we are very very used to needing to optimize  
our software to be just a little bit faster in any  
language… So if software is ‘almost’ fast enough to  
work in ruby, usually we do the same thing in ruby that  
we would do in C or Java, etc… find a way to optimize  
it to be ‘fast enough’.)

> I don’t get the problem with someone who wishes ruby to  
> be even better (yes, that means faster this time, performance  
> is one quality of software, along with a lot of others)  
> than it already is.

I don’t see a problem with wishing ruby were better or  
faster, either. Believe me… I do an awful lot of  
wishing that I could write a whole 3D game in ruby.  
I’m wishing that most every day…

But in practical terms, there will almost certainly  
always be some set of applications too demanding to  
be written in 100% ruby.

So… ?

a. Who thinks it would be nice if ruby were faster?

(Whole room raises hands.)

b. Who can estimate, based on progress with YARV, and  
historical speed gains of Smalltalk VM’s, how much  
faster ruby is likely to _ever_ get, compared to its  
current performance?

(2x? 4x? 8x? …?)

c. Who has anything new to add that would help the folks  
already working on making ruby faster?

Regards,

Bill

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/7 "2006-07-14T22:41:57Z")

</div>

From: “Simon Kröger” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> But we have a holy war here.
> 
> I don’t get it.

It’s not a holy war. It’s a spectrum of facts and  
wishes and theoretical limitations and human resources.

Regards,

Bill

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:57pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/8 "2006-07-14T22:57:51Z")

</div>

Bill K. wrote:

> > There would be even more applications ruby would be fast  
> > enough for if ruby would just be a little bit faster.
> 
> Yes… but the reason I stated it in terms of limits,  
> was to show that what you’re saying will always be true.

Agreed.

> > I don’t get the problem with someone who wishes ruby to  
> > be even better (yes, that means faster this time, performance  
> > is one quality of software, along with a lot of others)  
> > than it already is.
> 
> I don’t see a problem with wishing ruby were better or  
> faster, either. Believe me… I do an awful lot of  
> wishing that I could write a whole 3D game in ruby.  
> I’m wishing that most every day…

I just don’t like if someone gets lapidated for saying so.

> But in practical terms, there will almost certainly  
> always be some set of applications too demanding to  
> be written in 100% ruby.

True, no one was questioning that.

Let’s write some code, I’m better writing ruby than doing  
smalltalk (erm, well you know what i mean)

cheers

Simon

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [July 14, 2006, 10:14pm UTC](https://www.ruby-forum.com/t/re-how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98458/9 "2006-07-14T22:14:39Z")

</div>

On 14-Jul-06, at 4:04 PM, Simon\_Kröger wrote:

> Bill K. wrote:
> 
> > As I mentioned, ruby is _already_ fast enough for some  
> > applications, and _will never be_ fast enough for others.
> 
> There would be even more applications ruby would be fast  
> enough for if ruby would just be a little bit faster.

That’s like saying if the moon was closer to the earth, the tides  
would be higher… no shit.

> I don’t get the problem with someone who wishes ruby to  
> be even better (yes, that means faster this time, performance  
> is one quality of software, along with a lot of others)  
> than it already is.

Here’s a novel idea, and please forgive the attitude I must be coming  
across with, it’s not my intent: Instead of bitching about these  
things endlessly on the mailing list, how about those who find it  
terribly important that it [ruby] be fast enough for them, work on  
making it fast enough for them. Rest assured, nobody else is going to  
do it for you unless it serves them as well or they’re being paid.

> Simon

–  
Jeremy T.  
removed\_email\_address@domain.invalid

“One serious obstacle to the adoption of good programming languages  
is the notion that everything has to be sacrificed for speed. In  
computer languages as in life, speed kills.” – Mike Vanier
