Feeds

Intel extends JavaScript for parallel programming

Google meets the Anti-Native Client

Internet Security Threat Report 2014

Intel is developing an extended version of JavaScript that brings parallel programming to web applications.

Codenamed River Trail, the project was revealed this week at the Intel Developer Forum in San Francisco, and the company has open sourced an early version of the technology in the form of a Firefox add-on.

For the most part, JavaScript – the web's standard scripting language – does not give applications access to multiple processor cores, or even a processor's vector instructions. This puts web applications at a significant disadvantage next to traditional native software.

"Clearly, it is time for JavaScript to catch up," reads a blog post from Stephan Herhut of Intel Labs. "With River Trail, it will finally be possible to stay in the browser even for more compute intensive applications like photo editing."

The technology provides access both to multiple cores and vectors instructions, and since it's embedded with JavaScript, Intel says, it will play nicely with HTML5, Canvas, and WebGL – the emerging standard building hardware-accelerated 3D graphics with JavaScript.

At IDF, Intel showed off a physics simulation built with River Trail and WebGL, and on an eight-core machine, it ran about fifteen times faster than a serial version written with standard JavaScript.

Though Mozilla played no role in the development of River Trail, Mozilla chief technology officer and JavaScript inventor Brendan Eich appeared at IDF in support of the technology. "The demo shows a 15x speedup over serial JavaScript. It lights up the ridiculously parallel hardware in modern CPUs and GPUs, for audio, video, image processing, automated voice response, computer vision, 3D gaming, etc. – all written in memory-safe, clean, functional JavaScript, without threads and their data races and deadlocks," Eich tells us over email.

Intel says it would like to submit the technology for standardization, and Eich – who works with the ECMA International, the JavaScript standard body – says he will promote the technology with the organization.

The technology was unveiled a day before Google released a new version of its Chrome browser that includes Native Client, a sandboxing technology for securely running native code inside a browser. Google is pushing Native Client because it too can give browser apps access to multiple cores and vector instructions, but Mozilla prefers to keep native code out of the browser.

"The promise of the web is that it's cross-platform, that it's source driven, that it evolves with time. Native Client doesn't actually solve any of those problems that the web actually solves," Mozilla open source evangelist Chris Blizzard told us this summer.

"Once you download the native code, there's no opportunity for browser optimization. There's no opportunity for all kinds of things. You have to keep in mind that the evolution of browsers over the last several years has been that we have made a 10X improvement on existing sites. The evolution of browsers has made everyone's applications faster, whether or not you've updated that site in X number of years.

"With Native Client, all of that disappears. The fast innovation we've seen on the web disappears. A source code–based world means that we can optimize things that the user hasn't even thought of, and we can deliver that into their hands without you, the developer, doing anything."

River Trail maintains this "source-code-based" setup. It merely extends JavaScript, adding a new ParallelArray type – similar to WebGL's typed arrays. The open source Firefox add-on includes a modified compiler that uses these ParallelArrays and generates OpenCL, which compiles to SSE instructions or parallel GPU instructions.

"River Trail extends JavaScript with a simple, yet powerful data-parallel programming model," writes Intel's Herhut. "Much effort was spent to make this extension feel as natural as possible. Our goal was to make writing web applications with River Trail as easy as writing regular JavaScript." ®

Choosing a cloud hosting partner with confidence

More from The Register

next story
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Sway: Microsoft's new Office app doesn't have an Undo function
Content aggregation, meet the workplace ... oh
Sign off my IT project or I’ll PHONE your MUM
Honestly, it’s a piece of piss
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
NetWare sales revive in China thanks to that man Snowden
If it ain't Microsoft, it's in fashion behind the Great Firewall
Chrome 38's new HTML tag support makes fatties FIT and SKINNIER
First browser to protect networks' bandwith using official spec
Admins! Never mind POODLE, there're NEW OpenSSL bugs to splat
Four new patches for open-source crypto libraries
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
Win a year’s supply of chocolate
There is no techie angle to this competition so we're not going to pretend there is, but everyone loves chocolate so who cares.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.