constrand = () =>123 * Math.random() constarr = newFloat32Array(10_000) vectorize0(rand, arr) // `arr` is now filled with random numbers
despite being a simple operation with no inputs, this still performs 4 times quicker than array.map, probably due to the fact that array.map passes three arguments
vectorize a zero parameter function
Example
despite being a simple operation with no inputs, this still performs 4 times quicker than
array.map
, probably due to the fact thatarray.map
passes three arguments