mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-15 12:54:54 +08:00
Improve speed of MPC by about 30%
Dear diary, I spend a whole day searching for why this implementation of the MPC was slower then my own implementation. I checked *everything*. I rewrote the front evolution to match with mine almost exactly. I was about to give up. And then I saw this... Arg!
This commit is contained in:
@@ -290,7 +290,7 @@ cdef class MCP:
|
||||
self.flat_cumulative_costs.fill(np.inf)
|
||||
self.dim = len(costs.shape)
|
||||
self.costs_shape = costs.shape
|
||||
self.costs_heap = heap.FastUpdateBinaryHeap(initial_capacity=size,
|
||||
self.costs_heap = heap.FastUpdateBinaryHeap(initial_capacity=128,
|
||||
max_reference=size-1)
|
||||
|
||||
# This array stores, for each point, the index into the offset
|
||||
|
||||
Reference in New Issue
Block a user