# Trace-trees and the ruby intepreter

**URL:** <https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604>\
**Category:** Ruby\
**Created:** [August 22, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604 "2008-08-22T22:51:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [August 22, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604/1 "2008-08-22T22:51:52Z")

</div>

I just saw a recent article on ArsTechnica  
([Firefox to get massive JavaScript performance boost | Ars Technica](http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html))  
which discussed using trace optimization ([http://andreasgal.com/](http://andreasgal.com/)) to  
boost the performance of JavaScript.

My initial reaction was that this seems like it would also work very  
well for ruby.

Personally I’m not familiar with the ruby interpreter so maybe this sort  
of this wouldn’t help at all. But after reviewing some of the notes in  
tracing it looks promising.

Does anyone here with more knowledge than me have any comment on this?

Best,  
John

---

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [August 23, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604/2 "2008-08-23T20:31:19Z")

</div>

On Aug 22, 4:47 pm, John L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just saw a recent article on ArsTechnica  
> ([Firefox to get massive JavaScript performance boost | Ars Technica](http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-)…)  
> which discussed using trace optimization ([http://andreasgal.com/](http://andreasgal.com/)) to  
> boost the performance of JavaScript.
> 
> My initial reaction was that this seems like it would also work very  
> well for ruby.

That was my reaction too. It makes me wonder what kind of  
optimizations are in Maglev.

I found a better article this morning giving more details on how trace  
optmization works:

[http://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey\_javascript\_lightsp.html](http://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey_javascript_lightsp.html)

-Qaexl

---

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [August 27, 2008, 12:07am UTC](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604/3 "2008-08-27T00:07:54Z")

</div>

John L. wrote:

> I just saw a recent article on ArsTechnica  
> ([Firefox to get massive JavaScript performance boost | Ars Technica](http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html))  
> which discussed using trace optimization ([http://andreasgal.com/](http://andreasgal.com/)) to  
> boost the performance of JavaScript.
> 
> My initial reaction was that this seems like it would also work very  
> well for ruby.

I think JIT compilers for Ruby are pretty rare as of now. Maybe Jruby  
has something that is JIT’y, but I’m not sure. There is the ‘ludicrous’  
optimizer as well as ruby2c, but that’s all I know of, and they’re  
pretty young.  
Yarv uses some inline caching for method signatures but that’s about  
where we stand.  
Rubinius might be different.  
Take care.

-=R

---

<div class="post-metadata">

**Author:** ![johnlester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Post date:** [August 27, 2008, 2:48am UTC](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604/4 "2008-08-27T02:48:52Z")

</div>

On Aug 23, 2008, at 11:26 , Qaexl wrote:

> That was my reaction too. It makes me wonder what kind of  
> optimizations are in Maglev.

Mostly that they’re sitting on a very well engineered engine… The  
technology there is very well exercised and would provide a very  
stable platform for nearly any dynamic language.
