SIMD brings speed-ups to many kinds of number crunching (3D computations, image processing, singal processing, etc.).
v + w = 〈v1, …, vn〉+ 〈w1, …, wn〉 = 〈v1+w1, …, vn+wn〉
At the moment, the API provides two data types:
var a = SIMD.float32x4(1.0, 2.0, 3.0, 4.0); var b = SIMD.float32x4(5.0, 6.0, 7.0, 8.0); var c = SIMD.float32x4.add(a,b);A few examples of available operators:
|float32x4.abs(v)||absolute values of v|
|float32x4.neg(v)||negated values of v|
|float32x4.sqrt(v)||the square roots of the values of v|
|float32x4.add(v, w)||pairwise addition of v and w|
|float32x4.mul(v, w)||pairwise multiplication of v and w|
|float32x4.equal(v, w)||determines, per pair of values from v and w, whether they are equal and returns the resulting booleans as a uint32x4|
What about the second use case? Here, ParallelJS  shines. It isn’t tied to specific vector sizes or vector element sizes. And it will probably eventually even be able to produce GPU code.
The SIMD API won’t be in ECMAScript 6, but will probably be included in either ECMAScript 7 or ECMAScript 8.