4 ms·
> A generic SIMD API on a high-level language like JavaScript is as bad as it gets. Dart VM SIMD API seems pretty nice to me: https://www.dartlang.org/articles
by markdog12 9y ago
> A generic SIMD API on a high-level language like JavaScript is as bad as it gets.
Dart VM SIMD API seems pretty nice to me: https://www.dartlang.org/articles/dart-vm/simd https://www.dartlang.org/articles/dart-vm/simd
double computeAverage(Float32x4List list) {
Float32x4 sum = new Float32x4.zero();
for (int i = 0; i < list.length; i++) {
sum += list[i];
}
// Perform horizontal operations once.
double average = sum.x + sum.y + sum.z + sum.w;
return average / (list.length*4);
}
You may not be able to squeeze out the same perf, but seems worth having to me.
> JS engines to provide OpenCL-like GPGPU-targeted API
This is an interesting project, deep neural nets running on WebGPU: https://mil-tokyo.github.io/webdnn/ https://mil-tokyo.github.io/webdnn/