The new Carackan engine aims to deliver similar functionality and help Opera stay competitive. According to developer Jens Lindström, Opera has had a small team working on the new engine for several months. Carakan will replace Futhark, the engine that is used in the latest stable version of Opera. Futhark, which was introduced in Opera 9.5, is a lightweight, stack-based bytecode interpreter that was designed with an emphasis on low memory consumption rather than optimal execution speed. Carakan supports a new register-based virtual machine and a nascent native code generator that leverages static type analysis.
Although the native code generator isn't ready yet, the new virtual machine is already much faster than the previous one. Builds aren't available to the public yet, but Opera says that it's internal benchmarking shows that Carackan is roughly 2.5 times faster in the SunSpider benchmark. With native code generation, the performance difference will be much more significant.
"The native code generation in Carakan is not yet ready for full-scale testing, but the few individual benchmark tests that it is already compatible with runs between 5 and 50 times faster, so it is looking promising so far," Lindström wrote. "On ECMAScript code that is particularly well-suited for native code conversion, our generated native code looks more or less like assembly code someone could have written by hand, trying to keep everything in registers."
Opera has also released some additional technical details about Vega, a hardware-accelerated vector graphics library that is used by the browser. Vega was originally developed to facilitate the implementation of SVG support in Opera, and it has since been adapted to power the HTML5 Canvas element. Opera developer Tim Johansson says that the browser could soon use Vega for all HTML rendering. This could potentially simplify the codebase by eliminating the need for platform-specific rendering code paths. It will also simplify implementation of some advanced CSS3 features and make it possible to leverage hardware acceleration for complex drawing.