In the new engine, we’ve instead opted for a register-based bytecode instruction set. In a register-based machine, instead of a dynamically sized stack of values, there’s a fixed size block of them, called “registers”. Instead of only looking at the values at the top of the stack, each instruction can access any register. Since there is no need to copy values to and from the top of the stack to work on them, fewer instructions need to be executed, and less data needs to be copied.

Although our new engine’s bytecode instruction set permits the implementation of a significantly faster bytecode execution engine, there is still significant overhead involved in executing simple ECMAScript code, such as loops performing integer arithmetics, in a bytecode interpreter. To get rid of this overhead we are implementing compilation of whole or parts of ECMAScript programs and functions into native code.

Another area of improvement is in the representation of JavaScript objects:

In the new engine, each object is assigned a class that collects various information about the object, such as its prototype and the order and names of some or all of its properties. Class assignment is naturally very dynamic, since ECMAScript is a very dynamic language, but it is organized such that objects with the same prototype and the same set of properties are assigned the same class.

This representation allows compact storage of individual objects, since most of the complicated structures representing the object’s properties are stored in the class, where they are shared with all other objects with the same class. In real-world programs with many objects of the same classes, this can save significant amounts of memory.

Opera claims that with these enhancements Caracan is currently 2.5 times faster than the engine which is featured in Opera 10 Alpha. With no release date yet, it will be interesting to see if these improvements will boost the popularity of the Opera browser, whose market share for January 2009 was 0,70% according to NetApplications.

Using the new Nitro Engine, for example, Safari executes JavaScript up to 30 times faster than Internet Explorer 7 and more than 3 times faster than Firefox 3 based on performance in leading industry benchmark tests: iBench and SunSpider.

If this were a real review and I were to bestow Safari 4 beta with a Stammy rating, it would come in at around 6.5-7 out of 10 with emphasis on its stability and speed. So what’s Safari 4 good for? Browsing the web, not tweaking it. Let’s not forget that Safari is the king of private browsing mode *wink wink*… well not for long, Firefox 3.1 gets native support for that too.

...but really, from a developper point of view, the least common denominator is still Internet Explorer, and it will be for a long time. Where is the good in supporting HTML 5 features, like canvas, when we know that even IE 8 won't know them ?

It's not really the fault of the monopoly, but more of the reluctance of IT departments to introduce competing browsers into the enterprise and computer suppliers not providing more options in their OEM installs. They are forcing the lowest common denominator.

InfoQ Weekly Newsletter

Join a community of over 250 K senior developers by signing up for our newsletter. If you are based in the EEA, please contact us so we can provide you with the protections afforded to you under EEA protection laws.

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

By subscribing to this email, we may send you content based on your previous topic interests. See our privacy notice for details.

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.