I have started the tedious work of porting the rest of cKDTree to C++. The structure is similar to the query method that is in C++ in the 0.16 branch. The other methods have much more to gain from C++ than query due to substantially larger Python overhead. On my old laptop with AMD Phenom the new query method reduced the query time from 85 seconds to about 3 seconds. The improvement in the other methods is likely to be much better than that. Right now I have mostly just copied out code and made placeholders for the C++. But the main structure is already there. It is now in this branch on Github: https://github.com/sturlamolden/scipy/tree/cpp_ckdtree/scipy/spatial/ckdtree (I am not sure if I should post a WIP PR or wait until it builds correctly so Travis does not have a heart attack.) Sturla
On Mon, May 11, 2015 at 5:19 PM, Sturla Molden <sturla.molden@gmail.com> wrote:
I have started the tedious work of porting the rest of cKDTree to C++. The structure is similar to the query method that is in C++ in the 0.16 branch.
The other methods have much more to gain from C++ than query due to substantially larger Python overhead. On my old laptop with AMD Phenom the new query method reduced the query time from 85 seconds to about 3 seconds. The improvement in the other methods is likely to be much better than that.
That sounds promising!
Right now I have mostly just copied out code and made placeholders for the C++. But the main structure is already there.
It is now in this branch on Github:
https://github.com/sturlamolden/scipy/tree/cpp_ckdtree/scipy/spatial/ckdtree
(I am not sure if I should post a WIP PR or wait until it builds correctly so Travis does not have a heart attack.)
For who wants to follow this more closely: - Enhancement issue: https://github.com/scipy/scipy/issues/4855 - PR: https://github.com/scipy/scipy/pull/4860 Ralf
On 18/05/15 22:16, Ralf Gommers wrote:
That sounds promising!
They have more Python overhead in the Cython code, e.g. extensive use of Python int, set and list. So I expect a better speedup with a single thread. Unfortunately they are more difficult to multithread because of the way the code is structured. I am porting them to C++ first, and then the parallel processing comes next. Sturla
On 18/05/15 22:16, Ralf Gommers wrote:
For who wants to follow this more closely: - Enhancement issue: https://github.com/scipy/scipy/issues/4855 - PR: https://github.com/scipy/scipy/pull/4860
More or less done now, it was easier than I anticipated. https://github.com/scipy/scipy/pull/4890 Sturla
participants (2)
-
Ralf Gommers -
Sturla Molden