JavaScript juices high-performance Web apps with SIMD.js API

Google, Mozilla, and Intel partner on SIMD.js API to boost games, video, audio apps for the Web

bolts of light speeding through the acceleration tunnel 95535268

Google, Intel, and Mozilla are developing SIMD.js, a JavaScript API for SIMD (Single Instruction Multiple Data) calculations to boost high-performance Web applications.

The API introduces new types and functions for SIMD computations to be implemented in browsers, particularly to “accelerate a wide range of demanding applications today, including games, video and audio manipulation, scientific simulations, and more, on the Web,” said Dan Gohman and Robert Nyman of Mozilla, in the blog late last week (Oct. 30). Applications could use the SIMD.js API directly, while libraries could work with SIMD.js to expose higher-level interfaces that applications can then employ. Emscripten will compile C++ with popular SIMD idioms onto optimized SIMD.js code, the bloggers said.

SIMD lets apps perform multiple operations on multiple data elements together, the blog notes. “For example, a SIMD add instruction can add multiple values, in parallel. SIMD is a very popular technique for accelerating computations in graphics, audio, codecs, physics simulation, cryptography, and many other domains.” Power usage also can be reduced via SIMD.

Intel, Google, and Mozilla have been looking to add SIMD support to the ECMAScript specification underlying JavaScript. The next version of the C++ language could also pick up SIMD. Mips, Power, and other platforms are in the mix for SIMD too.

Originally derived from the DART SIMD specification, SIMD.js has been evolving to become a more general API. For now, SIMD.js is focused on supporting x86 platforms for SSE and ARM platforms with NEON, with plans for adding SIMD.js to asm.js, a low-level subset of JavaScript.

Copyright © 2014 IDG Communications, Inc.

How to choose a low-code development platform