• On TechRepublic: Five super-secret features in Windows 7
February 5, 2009 2:55 PM PST

Chrome takes new tack for faster JavaScript

by Stephen Shankland
  • Font size
  • Print
  • 5 comments

Chrome programmers have switched out a third-party software package in favor of their own as part of Google's attempt to speed its open-source browser up more.

The change came with a key component for processing JavaScript text called regular expressions. "As we've improved other parts of the language, regexps started to stand out as being slower than the rest. We felt it should be possible to improve performance by integrating with our existing infrastructure rather than using an external library," according to a Chromium blog post by programmers Erik Corry, Christian Plesner Hansen, and Lasse Reichstein Holst Nielsen.

Thus was born Google's own project, Irregexp, the headline feature in the new developer preview version of Chrome, 2.0.160.0 (release notes). Check the blog post if you're curious about the technical details of Google's choices about native code generation, backtracking avoidance, and intermediate automaton representation.

Previously, Chrome used a supporting software package, or library, called JPCRE, a variation by the Webkit browser project of the PCRE package. That eased compatibility issues by making Chrome behave more like Apple's Safari, which is based on Webkit, but Google thinks it's got the compatibility issue in hand.

"During development we have tested Irregexp against one million of the most popular Web pages to ensure that the new implementation stays compatible with our previous implementation and the Web," the programmers said.

Separately, the programmers said they created a new third version of their JavaScript benchmark. This version specifically exercises regular expressions taken from 50 of the Web's most popular pages.

JavaScript is increasingly widely used to build sophisticated Web applications, including Google Docs and Gmail, for example.

Speed is particularly important because JavaScript is used for interactive aspects of Web pages, where fast response or annoying lags are noticeable by people controlling the application. But it's also widely used for many more mundane aspects of Web pages, so JavaScript speedup helps improve Web browsing performance broadly.

Chrome's JavaScript engine is called V8. Mozilla's Firefox has TraceMonkey, and WebKithas Squirrelfix Extreme. Opera hopes to outdo all those with its own new JavaScript engine, called Carakan.

More changes are coming to V8, though, and Google will detail some at its May developer conference, Google I/O. One session there will focus on the software, including "initiatives that will propel V8 to the next performance level," according to the session notes.

Separately, Google also released the new version 1.0.154.46 of Chrome for both its stable and beta version users on Wednesday. That version fixed a security problem and an issue with Chrome's incognito mode.

Stephen Shankland writes about a wide range of technology and products, but has a particular focus on browsers and digital photography. He joined CNET News in 1998 and since then also has covered Google, Yahoo, servers, supercomputing, Linux and open-source software, and science. E-mail Stephen, or follow him on Twitter at http://www.twitter.com/stshank.
Add a Comment (Log in or register) (5 Comments)
  • prev
  • 1
  • next
by flickrz February 5, 2009 4:18 PM PST
Any benchmark data Stephen?
Reply to this comment
by pbookman February 5, 2009 5:21 PM PST
The current version is .48 not .46
Reply to this comment
by February 6, 2009 2:31 PM PST
NO MORE BROWSERS!!!
Reply to this comment
by pjk0 February 6, 2009 7:08 PM PST
It's getting awfully boring seeing an article from Shankland every 2 days hyping some other alpha-level Chrome feature. Please find something more useful to write about.
Reply to this comment
by ukdude February 28, 2009 10:50 AM PST
So this is comparing a beta Safari which scores 100% on Acid3 with not standard 79%-scoring Chrome (which is slower than this Safari on SunSpider), but with an experimental Chrome build. A bit like comparing a street legal production car with a specially built hotrod!

They are both fine browsers, of course, but right now Safari is a more sensible choice than Chrome.
Reply to this comment
(5 Comments)
  • prev
  • 1
  • next
advertisement
Click Here

About Webware

Say No to boxed software! The future of applications is online delivery and access. Software is passé. Webware is the new way to get things done.

Add this feed to your online news reader

Webware topics

The browser battles go on and on

roundup From Firefox to IE and from Chrome to Opera and Safari, there's no sitting still for browser makers looking to keep their products fresh and competitive.

3G wireless still holds promise

The next generation of 4G wireless may get all the headlines, but advanced 3G technology will likely dominate services for the next few years.

Inside CNET News

Scroll Left Scroll Right