Closed KristofferC closed 9 years ago
The n_th element sorting here:
https://github.com/KristofferC/KDtree.jl/blob/master/src/kd_tree.jl#L171
allocates a new anonymous function in each iteration. We therefore create ~ 2 * n_points anonymous functions which currently is using almost all the memory required to create the tree.
https://github.com/KristofferC/KDtree.jl/commit/6d8829c1611f449dfd82b0a21c11fd15c90535de should fix this in an inelegant way.
The n_th element sorting here:
https://github.com/KristofferC/KDtree.jl/blob/master/src/kd_tree.jl#L171
allocates a new anonymous function in each iteration. We therefore create ~ 2 * n_points anonymous functions which currently is using almost all the memory required to create the tree.