Feeds

Intel extends JavaScript for parallel programming

Google meets the Anti-Native Client

The Power of One Brief: Top reasons to choose HP BladeSystem

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." ®

Seven Steps to Software Security

More from The Register

next story
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Securing Web Applications Made Simple and Scalable
Learn how automated security testing can provide a simple and scalable way to protect your web applications.