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 Hacks.Mozilla.org 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.