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
Why responsiveness matters
Other factors contribute to the subjective impression of more speed in Chrome. The common problem with Firefox 3.0.1 is that many web applications running in multiple tabs at once can overwhelm the browser. If a single application gets stuck in an endless loop or eats up all resources, the navigation between Firefox tabs slows to a halt. This happens because the browser's SeaMonkey engine is running JavaScript code from all tabs in a single process. Therefore, expensive computations can make the entire browser UI unresponsive.
Chrome is cleverly designed to prevent this from happening. It treats each tab as a separate process isolated from other tabs, including JavaScript code that runs inside a tab. If the code running in a tab gets stuck or freezes, JavaScript programs in other tabs continue to run in their own separate processes. The browser still allows you to switch between tabs or kill a misbehaving tab and the UI remains responsive. Mozilla's answer to Google approach is a Firefox 3.1 technology dubbed Web Workers.
Web Workers vs. WorkerPool API
Web Workers technique allows web developers to move expensive JavaScript computations to a background thread that run in parallel to their main web page. The browser will even pause the execution of threads while a user is navigating away from the web page to retain responsiveness. Chrome has a similar technology dubbed WorkerPool API, which allows web developers to run JavaScript code as a separate background process, without blocking the main page's script execution. Both technologies result in a responsive UI and smooth tab switching during heavy computations. Chrome's WorkerPool API is marginally more resourceful due to the use of background processes (as opposed to Web Workers' background threads) that result in less overhead in extreme situations.
It should be noted that web applications do not automatically benefit from these technologies unless developers optimize their code for Web Workers or WorkerPool API (or both). In that sense, Google Chrome has the upper hand for now because Web Workers come as an integral part of Gears technology (built in Chrome) that has been available to web developers for over a year, meaning it gained initial traction.
Gears (also from Google) is an open-source API that lets developers create web applications that interact naturally with a users' desktop, enable offline execution by storing data locally in a fully-searchable database and improve performance by running JavaScript in the background process (WorkerPool API). Several key web applications have been Gears-enabled, such as Google Docs, Google Reader, Wordpress, Remember the Milk, Zoho Writer, etc. Gears-enabled web applications require a free browser extension available for Firefox/IE on Windows, Windows Mobile, Mac and Linux.
Conclusion
Browser makers have been sleeping for much too long. When Safari for Windows was released, its speedy JavaScript engine triggered a new round of a browser speed race. Chrome is now raising the bar much higher. Google's browser may not dominate but it has already taken browser industry to the next level, as much as the iPhone took the mobile industry to new heights. In this sense, speed has become the new green in the browser market.
The effects of the new speed mantra will benefit everyone, mostly end-users. The need for speed pushes browser vendors to come up with innovations. End-users are already enjoying first fruits of their efforts - speedier web application performance and more fluid UI. Improved JavaScript engines directly translate into more power at the developer's disposal.
We credit Google’s engineers to have started a new speed race and challenge the established browser makers with new ideas that ultimately will benefit us all – whether you consider a browser as a future operating system or as, well, just a browser.
What fascinating times we live in.









Workout of the Day