Analysis – You may have decided against a switch to Chrome (at least market share data indicates that Chrome is losing share quickly again), but there is a good chance you won’t get rid of the browser entirely. We guess you may even launch it from time to time, especially when IE or Firefox get stuck. Whatever Chrome’s future path may be, its responsiveness and speed have left a lasting impression that will stick. Other browser makers took notice and are working on faster browsers as well: Firefox 3.1, scheduled for a late 2008 release, comes with TraceMonkey and Web Workers, two key technologies that could easily render Chrome's speed gains obsolete. TG Daily had a close look on what to expect from the current speed race and next-gen browsers.

Google's Chrome caused controversial discussions, both for its advantages and apparent lack of advanced features. But critics and fans agree that this thing is fast, really fast. You may be wondering why speed matters since your current browser already loads web pages in a snap. But here is the deal: Today’s web sites are not collections of individual pages anymore. You are probably using web applications on an everyday basis - on sites like Facebook or Google Docs. As more computing services move to the cloud, web applications are becoming more powerful and desktop-like. In this sense, a browser becomes an operating system for web applications and needs to do much more than take advantage of a broadband connection.

The engine that is running under a browser's hood directly affects how much horse power web applications have at their disposal. Chrome excels in this area thanks to two key solutions: V8 and its clever design. V8 is Chrome's JavaScript engine that turns JavaScript programs in a so-called machine code, basically a series of instructions native to the processor powering your computer. The browser's clever design stems from the fact that Google’s engineers had the resources to design a browser from scratch. Chrome feels smooth: Tabs switch instantly and user interface (UI) is responsive even when a tab is stuck in an endless loop or takes all resources for itself.

If early Firefox 3.1 alpha builds are any indication, Chrome's key advantages may be short-lived. Firefox 3.1 features the new JavaScript engine called TraceMonkey that replaces the SpiderMonkey engine used in Firefox 3.0.1. Since most web applications are written in JavaScript, performance improvements in a browser's JavaScript engine are directly passed on to web applications. Early benchmarks reveal that TraceMonkey runs JavaScript code up to 30x faster than SpiderMonkey and even faster than Chrome's V8.


What was wrong with SeaMonkey anyway?


Firefox 3.0.1's SpiderMonkey and V8 have very little in common. SpiderMonkey works by compiling JavaScript programs into a so-called byte-code, essentially an intermediary representation of the JavaScript source code. During run-time, SpiderMonkey takes a byte-code line and compiles it into a machine code that a processor natively speaks. It then executes the resulting machine code instructions and repeats the process by moving on to a new byte-code line. Chrome uses different approach. Its V8 engine first compiles the complete JavaScript code into a machine code, which quite apparently results in much faster execution.

In a more transparent way, you could compare SpiderMonkey to a person that speaks no foreign language and relies on a translator to communicate with non-native speakers. For each sentence, SpiderMonkey has to pause and wait for the translator to translate a phrase into a foreign language. In contrast, Google’s V8 may spend some time upfront to learn a foreign language, but the progress enables the browser to speak a foreign language fluently – and does not need a translation service as a result.


V8 vs. TraceMonkey

Firefox 3.1's TraceMonkey engine offers "performance improvements ranging between 20 and 40 times faster in some cases," says Mozilla's CTO Brendan Eich. A commonly used benchmark called SunSpider provides evidence for Eich's claim. Compared to Google’s V8, the results reveal that TraceMonkey is 1.28 times faster on Windows XP running on a Mac mini and 1.19 times faster on Vista running on a Macbook Pro. "Maybe we should rename TraceMonkey as V10," Eich joked. "This is not a trivial feat." Kevin Purdy of Lifehacker also tested Firefox 3.1 and Chrome. He also found TraceMonkey to be faster than V8. "Firefox bests Chrome by a handy lead," Purdy wrote.

More than anything, benchmarks that compare Firefox 3.0.1 and Chrome best highlight the tremendous TraceMonkey speed gains. For instance, Cnet's test show that "Chrome's overall score is head and shoulders above the competition for executing JavaScript" on the same five sub-tests by which Google measures V8 performance. You can benchmark your browser against Chrome using the same Google benchmark.

Most JavaScript benchmarks suggest that Firefox 3.1 could easily offset Chrome's speed advantages - good news for Firefox power users who run many popular web applications at once, such as Gmail or Facebook.


Read on the next page: Resposivness, New APIs, Conclusion