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

Security for virtualized datacentres

More from The Register

next story
Microsoft WINDOWS 10: Seven ATE Nine. Or Eight did really
Windows NEIN skipped, tech preview due out on Wednesday
Business is back, baby! Hasta la VISTA, Win 8... Oh, yeah, Windows 9
Forget touchscreen millennials, Microsoft goes for mouse crowd
Apple: SO sorry for the iOS 8.0.1 UPDATE BUNGLE HORROR
Apple kills 'upgrade'. Hey, Microsoft. You sure you want to be like these guys?
ARM gives Internet of Things a piece of its mind – the Cortex-M7
32-bit core packs some DSP for VIP IoT CPU LOL
Microsoft on the Threshold of a new name for Windows next week
Rebranded OS reportedly set to be flung open by Redmond
Lotus Notes inventor Ozzie invents app to talk to people on your phone
Imagine that. Startup floats with voice collab app for Win iPhone
'Google is NOT the gatekeeper to the web, as some claim'
Plus: 'Pretty sure iOS 8.0.2 will just turn the iPhone into a fax machine'
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.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.