[Numpy-discussion] searchsorted() and memory cache

Charles R Harris charlesr.harris@gmail....
Thu May 15 14:26:50 CDT 2008


On Wed, May 14, 2008 at 8:50 PM, Andrew Straw <strawman@astraw.com> wrote:

> Aha, I've found the problem -- my values were int64 and my keys were
> uint64. Switching to the same data type immediately fixes the issue!
> It's not a memory cache issue at all.
>
> Perhaps searchsorted() should emit a warning if the keys require
> casting... I can't believe how bad the hit was.
>

I think it used to fail and that was fixed not so long ago. Was it casting
the keys or was it casting the big sorted array? The latter would certainly
slow things down and would be a bug, and a bug of the sort that might have
slipped in when the casting was added.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080515/fc14e765/attachment.html 


More information about the Numpy-discussion mailing list