mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
A loop such as `for (let i = 0; i < out.length; i++) out[i] = x[i] * y[i]` keeps its integer induction, and the version guard now also receives the loop's counted form, so it covers the accesses of `x` and `y` at the counter. Before, only counted loops (`i < n`) passed a counter to the guard, and loops to a length kept one bounds check per access of every other typed array, which kept LLVM from vectorizing them. Adds the typed-array-kernels runtime workload: element-wise loops over Float64Array, Float32Array, Uint8Array and Int32Array, and RGBA to gray.