Hacker News new | ask | show | jobs
by gopalv 4244 days ago
Neat, looks like JS is getting SIMD speedups because of fixed type objects.

Would really love to see the speedup on fixed tuple transforms and convolution algorithms.

When I saw JS speed wars originally, I started writing an adobe curve apply algorithm in JS, to apply .acv curves live using Canvas, but essentially hit CPU & shelved it.

https://github.com/t3rmin4t0r/io.dine/blob/master/lib/iodine...

http://notmysock.org/code/iodine/

I want to rewrite it using something like the newly introduced float32x4, assuming I can read out the images int o RGBA tuples.

Something like a blur would actually be possible once this is fast.

2 comments

That applycurve function has what appears to be a gather, which is unfortunately outside of where we expect to be with the initial iteration of SIMD.js, as there isn't widespread CPU SIMD hardware support for it yet. However, the brighten function immediately above it, for example, is supported by features in the SIMD.js spec today.
Hey, I have implemented Curves transform in JS too! :) You can find it at http://www.Photopea.com (Ctrl+M). It works pretty fast even on large images.