# Make it faster

**URL:** <https://www.ruby-forum.com/t/make-it-faster/87688>\
**Category:** Ruby\
**Created:** [March 5, 2007, 6:28am UTC](https://www.ruby-forum.com/t/make-it-faster/87688 "2007-03-05T06:28:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 5, 2007, 6:28am UTC](https://www.ruby-forum.com/t/make-it-faster/87688/1 "2007-03-05T06:28:33Z")

</div>

you know those threads where someone posts a bit of slow ruby code, then  
people rework it until it’s orders of magnitude faster?

what’s the BEST one you can remember?

thanks.

-a

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 5, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/make-it-faster/87688/2 "2007-03-05T22:35:01Z")

</div>

On Mar 4, 2007, at 21:28, Ara.T.Howard wrote:

> you know those threads where someone posts a bit of slow ruby code,  
> then  
> people rework it until it’s orders of magnitude faster?
> 
> what’s the BEST one you can remember?

I liked the one I posted with my writeup of making png.rb faster with  
RubyInline since Dominik (sp?) gained similar speedups with pure-  
ruby. I think the pure-ruby speed-up ended up within an order of  
magnitude of the selectively-optimized RubyInline version. Instead  
of making the operations faster, Dominik changed the data structures  
slightly for speed to reduce work.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2007, 7:41pm UTC](https://www.ruby-forum.com/t/make-it-faster/87688/3 "2007-03-07T19:41:32Z")

</div>

On Mar 5, 2007, at 1:34 PM, Eric H. wrote:

> of magnitude of the selectively-optimized RubyInline version.  
> Instead of making the operations faster, Dominik changed the data  
> structures slightly for speed to reduce work.

I tried to apply dominik’s changes and the problem was that they  
broke a lot of stuff. I don’t see his numbers as being entirely  
valid, but his approach was.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2007, 7:50pm UTC](https://www.ruby-forum.com/t/make-it-faster/87688/4 "2007-03-07T19:50:34Z")

</div>

On Thu, 8 Mar 2007, Ryan D. wrote:

> > RubyInline since Dominik (sp?) gained similar speedups with pure-ruby. I  
> > think the pure-ruby speed-up ended up within an order of magnitude of the  
> > selectively-optimized RubyInline version. Instead of making the operations  
> > faster, Dominik changed the data structures slightly for speed to reduce  
> > work.
> 
> I tried to apply dominik’s changes and the problem was that they broke a lot  
> of stuff. I don’t see his numbers as being entirely valid, but his approach  
> was.

lol - i just presented it in class 1 hr ago! but, as you correctly  
point out

- it’s the concept which is valid, if not the implimentation.

ps. presented hoe too.

cheers.

-a

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/make-it-faster/87688/5 "2007-03-07T19:54:40Z")

</div>

On 3/7/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> lol - i just presented it in class 1 hr ago! but, as you correctly point out
> 
> - it’s the concept which is valid, if not the implimentation.

Sorry for being completely OT but it just stroke me:  
Do your students know to read the ML before the exams?

Cheers  
Robert
