3 ms·
>You point out that _also_ needed the move to array-based things to take full advantage of it, to minimize trips across the python/C boundary if I understand ri
by carlmr 4y ago
>You point out that _also_ needed the move to array-based things to take full advantage of it, to minimize trips across the python/C boundary if I understand right.
So yes and no. Moving to array-based operations removes the need for the for-loops in python that are slow. So you can do more on the C backend than in the slow Python frontend, by changing to an array-based style.
If you did this for single numbers, the boundary operations would be too much to make this useful. By moving the array into the backend we have a lot of computations in C, so it's useful to incur the penalty at the boundary.