the force that pushes object up
Random header image... Refresh for more!

TraceMonkey Internals

With the evolution of Web 2.0 applications which use JavaScript heavily, web browser developers shift their focus more on JavaScript engines running inside their browsers. As the answer to the performance problems issues in JavaScript engines new types of implementations which use different techniques comes in to battle between JavaScript engines. The most recent introductions are Mozilla’s TraceMonkey JS engine and Google’s V8 JS engine. According to the benchmarks both engines run pretty past and we must thank the developers of those JS engines for that. There are various techniques behind this performance improvements.

David Mandelin who works on Mozilla’s JavaScript team recently published a great overview document about trace trees and TraceMonkey JS engine. This is a must read article for those who use JavaScript heavily in there web applications and web pages. This article will give you better understanding about recent improvements in Mozilla’s JS engine previously known as SpiderMonkey and best practices you must follow to improve performance of your JS code.

Short Summary

In the first part of the article David describes the performance overhead added by dynamic typing and interpreters. Second part is about tracing and how we can get to know about types using tracing. Next comes the description about TraceMonkey implementation.  In the forth part he describes where tracing will not work, what are the improvements need to be done and the limitations of tracing. Last part is about different JavaScript JIT designs.

I think it’s worth reading this article if you need to understand the architecture behind modern JS engines.

Related Articles:

July 21, 2009   No Comments