[SciPy-dev] Ball Tree code (ticket 1048)

Sturla Molden sturla at molden.no
Tue Nov 17 06:45:41 EST 2009


Anne Archibald skrev:
 >
 > * The code is specific to Euclidean distances.

I was wondering if we should try to loop-unroll minkowski distances in 
cKDTree? Right now it does a lot of wasteful for work for common cases 
like Euclidian distances.

I think this version should be rather friendly to autovectorizing 
compilers. It's easy to change the hard-coded values of k and p by 
editing minkowski.py.

Also, absolute values are computed by zeroing the sign bit, which is 
much faster.

Sturla Molden
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: minkowski.py
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20091117/11df4b32/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: minkowski.pyx
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20091117/11df4b32/attachment-0001.ksh>


More information about the SciPy-Dev mailing list