Intel River Trail adds parallel dimension to JavaScript

Open source browser extension instructs JavaScript code how to make use of multicore processors

Intel today officially announced the availability of River Trail, an open source JavaScript engine for multicore processors, in the hopes of enabling complex browser-based apps capable of leveraging untapped parallel-processing power.

The release of River Trail comes at a time when JavaScript has started to show its age and its evolution has hit political roadblocks. The language isn't going away any time soon, though, so vendors are continuing to pour resources into retaining its viability in the increasingly complex Web-based world of computing. Google, for example, has aspirations to create a replacement for JavaScript with a language called Dart -- but the company intends to continue contributing to the evolution of JavaScript in the near term.

River Trail is intended as solution for Web-application developers whose efforts to code rich, robust, complex applications are hindered by the fact that browser-based JavaScript apps don't make full use of multiprocessor chips. Thus, even on a state-of-the-art multicore PC, a 3D browser-based game will suffer performance issues that a native version of the game would not, because only the native version would know how to take advantage of the machine's parallel processors.

River Trail is an extension that effectively instructs JavaScript in how to make use of multiple cores with a few simple data-parallel instructions. As the River Trail team puts it, "River Trail gently extends JavaScript with simple deterministic data-parallel constructs that are translated at runtime into a low-level hardware abstraction layer. By leveraging multiple CPU cores and vector instructions, River Trail achieves significant speedup over sequential JavaScript."

Intel stressed that the extension is not aimed just at browser-based games. Web-based, compute-intensive photo-editing applications could be a target. In a demo of River Tail, Intel showed how River Trail improved the performance of particle physics simulator 15-fold, from 3 frames per second to 45fps.

According to Intel's Stephen Herhut, the River Trail team has taken pains to ensure coding with River Trail is as easy as writing regular JavaScript. Additionally, he said that River Trail works seamlessly with HTML5 APIs, as well as with WebGL, a new JavaScript API to OpenGL for adding 3D visualization to browsers.

According to i-programmer's Harry Fairhead, River Trail's capabilities could find their way into the next release of JavaScript. "Brendan Eich, the inventor of JavaScript, was present at the presentation of River Trail ... and commented that he would lobby for it to be part of the ECMAScript standard," Fairhead wrote.

Securitywise, Herhut said that River Trail was designed to inherit the security traits of JavaScript. "I am confident to say that our extensions to JavaScript do not add any further attack surface to the browser," he wrote.

Still, the River Trail page recommends that "River Trail is a prototype, and the extension is not yet meant for use on the public web. Please uninstall or disable the extension when surfing the web and use it only for web pages you trust."

Currently River Trail is available only for Firefox, downloadable at github.com. Intel would like to see the extension added to other browsers, too.

This story, "Intel River Trail adds parallel dimension to JavaScript," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Recommended
Join the discussion
Be the first to comment on this article. Our Commenting Policies