Re: [Numpy-discussion] Fancy Indexing of Structured Arrays is Slow

2014-05-16 Thread Sebastian Berg
On Do, 2014-05-15 at 12:31 +, Dave Hirschfeld wrote: As can be seen from the code below (or in the notebook linked beneath) fancy indexing of a structured array is twice as slow as indexing both fields independently - making it 4x slower? I found that fancy indexing was a bottleneck in

Re: [Numpy-discussion] Fancy Indexing of Structured Arrays is Slow

2014-05-16 Thread Sebastian Berg
On Do, 2014-05-15 at 12:31 +, Dave Hirschfeld wrote: As can be seen from the code below (or in the notebook linked beneath) fancy indexing of a structured array is twice as slow as indexing both fields independently - making it 4x slower? I found that fancy indexing was a bottleneck in

Re: [Numpy-discussion] Fancy Indexing of Structured Arrays is Slow

2014-05-16 Thread Dave Hirschfeld
Sebastian Berg sebastian at sipsolutions.net writes: On Do, 2014-05-15 at 12:31 +, Dave Hirschfeld wrote: As can be seen from the code below (or in the notebook linked beneath) fancy indexing of a structured array is twice as slow as indexing both fields independently - making it

Re: [Numpy-discussion] Fancy Indexing of Structured Arrays is Slow

2014-05-16 Thread Julian Taylor
On Fri, May 16, 2014 at 10:08 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Do, 2014-05-15 at 12:31 +, Dave Hirschfeld wrote: As can be seen from the code below (or in the notebook linked beneath) fancy indexing of a structured array is twice as slow as indexing both fields

Re: [Numpy-discussion] Fancy Indexing of Structured Arrays is Slow

2014-05-16 Thread Dave Hirschfeld
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.

Re: [Numpy-discussion] Fancy Indexing of Structured Arrays is Slow

2014-05-16 Thread Julian Taylor
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