Chrome and a V8: JavaScript Takes a Giant Leap Forward? 2

Posted by Rich Apodaca Fri, 05 Sep 2008 01:42:00 GMT

Back when I started writing Java software in 1997, the Java Virtual Machine was slow. It was so slow that for years, many developers abandoned all hope of using the language for "serious" work once it became clear how much slower it was than C and C++. Eleven years of Moore's Law compounding, and countless JVM optimizations later, Java is so fast today that relative speed is rarely even considered when developing client and server applications.

Today, JavaScript occupies a similar position to that held by Java in 1997: a ubiquitous language with a basically good design that has significant performance issues.

The Next Big Thing? JavaScript Virtual Machines

This situation may be about to change - radically. Several groups are going to great effort to improve the performance of JavaScript by creating JavaScript Virtual Machines. The most recent entry into this increasingly crowded field is Google Chrome. Among Chrome's many innovations is the introduction of one of the first JavaScript Virtual Machines (V8) into a production browser. A virtual machine works fundamentally differently from traditional JavaScript interpreters, with the potential for greatly reduced memory requirements and speed increases.

Put a V8 in Your Browser

How fast is Chrome's V8 engine? We can get an idea by running some benchmarks.

The chart below shows the results of running Google's V8 Benchmark Suite (bigger bars mean faster execution):

As you can see, Chrome leaves both Firefox 3 and IE 7 in the dust, at least according to this benchmark. Another popular benchmark is SunSpider, where the results are qualitiatively similar; Chrome's execution time surpasses that of IE 7 by over two orders of magnitude.

My system consisted of an Ubuntu Linux machine running a clean install of Windows XP on Sun's excellent virtualization product, VirtualBox. Your mileage may vary. Note: it's important to disable Internet Explorer's warning prompt that reads "This page contains a script which is taking an unusually long time to finish. To end this script now, click Cancel." (the presence of which is telling in itself).This can be done by following the instructions here.

Conclusions

JavaScript is in the middle of a textbook Marketplace Disruption. Just four years ago, few even thought about the language. Today it's the centerpiece of Web interactivity. Perhaps the biggest issue remaining, performance, is now the focus of intense research that is beginning to bear fruit. Many of the key technologies now starting to appear, such as V8, are modular and open source; other browser vendors can adapt them for use in their own products. It's an offer few can afford to refuse.

Sooner than many might have thought possible, JavaScript may stop being viewed as the slow language. Then what?

Google Chrome: Rethinking the Browser - as an Operating System 2

Posted by Rich Apodaca Tue, 02 Sep 2008 14:57:00 GMT

As widely covered in the technical and popular press (example), later today Google is releasing the first version of its new Web browser, Chrome. What makes Chrome different from the seemingly endless array of browsers already available?

For now, we'll have to make do with the, umm, whitepaper. But if what Google says is to be believed, Chrome is nothing less than a fundamentally new way of looking at the browser's place in the computing ecosystem.

Microsoft looks at the browser as an extension of its proprietary operating system. Firefox, Opera, and Apple look at the browser as a lightweight, fast, standards-compliant, stable application that runs within the host operating system.

Google looks at the browser differently, and Chrome may define a new category of software.

To Google, the browser is an operating system in its own right, with everything the term suggests, ranging from security to isolation of processes to the ability to run demanding applications.

Although Google's not saying so directly, Chrome is a Web-oriented operating system that runs on top of your operating system of choice (or coercion).