JavaScript gains support for SIMD
Recently , a new JavaScript feature has landed for the next Firefox Nightly: an API for SIMD (Single Instruction, Multiple Data). This blog post explains how the API works and how it fits into the JavaScript landscape. What is SIMD? SIMD is the ability of a CPU to apply an operand to vectors of values, instead of single values. For example, a CPU may be able to add two vectors v and w by adding their components, hence applying the single instruction addition to multiple data: v + w = 〈v 1 , …, v n 〉+ 〈w 1 , …, w n 〉 = 〈v 1 +w 1 , …, v n +w n 〉 SIMD brings speed-ups to many kinds of number crunching (3D computations, image processing, singal processing, etc.). John McCutchan (Google) and Peter Jensen (Intel) have proposed a JavaScript API for SIMD. That API initially grew out of the SIMD support in Dart, because Dart SIMD code needed to be compiled to JavaScript. At the moment, the API provides two data types: float32x4 (C type: __m128): four 32 bit floating point n...