~8x slower registration with itk-elastix Python API vs elastix CLI — minimal reproducible example

Thanks for the suggestion, @blowekamp Is this what you had in mind?

I observed a major performance improvement (10% to 40%), when moving the accumulation of joint histograms from the “AfterThreaded” member function to the “Threaded” member function (even though it adds mutex locking).

However it might yield slightly different results, each time the joint histogram is computed, because it might add floating point numbers in a different order, each time. And you know, for floating point numbers, a + b + c may not be exactly equal to b + c + a. So I feel reluctant to merge this PR. :person_shrugging:

2 Likes