4 ms·
At least in CPython sum() will go through PyNumber_Add over heap allocated Python objects. With numpy.sum, the inner loop of the ufunc is summing over an contig
by freyrs3 13y ago
At least in CPython sum() will go through PyNumber_Add over heap allocated Python objects. With numpy.sum, the inner loop of the ufunc is summing over an contiguous block of machine types.