We explore how to speed up binary search by batching independent searches with NumPy's vectorized operations. We then reformulate the algorithm so all searches progress together with only $O(1)$ additional memory, port it to C++, and achieve up to a 25× speedup over NumPy 2.4's implementation.
Ah yes, you’re right! That’s another common use of the word.
EDIT: looking at np.vectorize, really just emitting a for loop without any additional processing is not what I, from an HPC standpoint, would call vectorisation. What I would call vectorization is jax.vmap, which actually changes the function (by tracing it first to get an AST) to operate on arrays of one dimension higher directly. This is usually a performance win but not quite always.
I believe the term is inherited from APL’s notion of vectorisation, which far predates actual vector processors. Numpy is explicitly APL-inspired, as I understand it.
Ah yes, you’re right! That’s another common use of the word.
EDIT: looking at np.vectorize, really just emitting a for loop without any additional processing is not what I, from an HPC standpoint, would call vectorisation. What I would call vectorization is jax.vmap, which actually changes the function (by tracing it first to get an AST) to operate on arrays of one dimension higher directly. This is usually a performance win but not quite always.
score 1 · canonical
I believe the term is inherited from APL’s notion of vectorisation, which far predates actual vector processors. Numpy is explicitly APL-inspired, as I understand it.
score 1 · canonical
I see! Good trivia on the night before my PhD defence. :)
score 1 · canonical