2 ms·
Yes it is useful, because "array ops" auto-vectorize well and you can write complex function that are vectorized. It's a bit like expression templates but with
by p0nce 5y ago
Yes it is useful, because "array ops" auto-vectorize well and you can write complex function that are vectorized. It's a bit like expression templates but with compiler support.
Typically if something can be written as an array op expression it isn't worth rewriting with intrinsics or assembly.
For me it's a killer feature :)
You can also mix and match scalar and slices, so for audio code it's quite cool:
a[0..frames] += b[0..frames] * volume;