Hacker News new | past | comments | ask | show | jobs | submit login
SpiderMonkey is on a diet (blog.mozilla.com)
115 points by ww520 on Nov 1, 2011 | hide | past | favorite | 7 comments



Fascinating article. Maybe I'm old, but I remember when TraceMonkey was the wave of the future that was going to outperform everything, not a hairball they'll be glad to see the back of.

I would be very interested to read their learnings from TraceMonkey, though.


Tracing can be good as icing on the cake, but it alone won't get you good performance. With just the interpreter (super slow) and TraceMonkey (super fast, when it worked) the end result is still pretty slow, and perf can be really uneven.

The picking of types at record-time in the tracer doesn't always work well. In particular, you can end up generating code for ints when really you have floats, or vice versa, which gives bad perf. Likewise arrays-of-ints/arrays-of-floats.

TraceMonkey was also written in a great hurry, which partly explains the hairball-ness.


The JavaScript compiler has gone through numerous revisions, and seems to get faster and more efficient by huge leaps. Consider the recent stories on the JavaScript H.264 implementation, where nightly releases of Firefox managed 30x as many frames per second.


That was before anyone else even had a JIT. So any JIT > no JIT.


>Fascinating article. Maybe I'm old, but I remember when TraceMonkey was the wave of the future that was going to outperform everything, not a hairball they'll be glad to see the back of.

I remember this too. It seems not so long ago I was reading benchmarks on shaver's blog demonstrating TraceMonkey's performance as largely comparable to the then-new V8. I agree that is kind of weird to hear that people hate the code and that Mozilla is throwing it out already.

I have perhaps not kept super informed on Firefox's JS internals, just reading a stray article here and there, but it raises some concerning questions for me that something that was brand shiny new and a major development effort just a few years ago would be discarded as a "hairball" that no one wants to maintain anymore. I can understand how that can happen in a reasonable environment, but it can also be a sign of a seriously flawed process.


Three years ago people didn't know that much about compiling JS really well. They know a lot more now. The lessons learned from each JIT helps make the next one better.


"learnings"?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: