On 16.05.2014 10:59, Dave Hirschfeld wrote: > Julian Taylor <jtaylor.debian <at> googlemail.com> writes: > >> >> >> if ~50% faster is fast enough a simple improvement would be to replace >> the use of PyArg_ParseTuple with manual tuple unpacking. >> The PyArg functions are incredibly slow and is not required in >> VOID_copyswap which just extracts 'Oi". >> >> This 50% increase still makes it slower than the simpler indexing >> variant as these have been greatly improved in 1.9 (thanks to >> Sebastian for this :) ) >> > > Yes, I'd heard about the improvements and am very excited to try them out > since indexing is one of the bottlenecks in our algorithm. >
I made a PR with the simple change: https://github.com/numpy/numpy/pull/4721 improves it by the expected 50%, but its still 40% slower than the improved normal indexing. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion