Closed dstansby closed 1 year ago
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.
This is the final peice in the puzzle for https://github.com/brainglobe/cellfinder-core/issues/89, converting the
CellDetector
class to numba. Some comments for context:connect_eight()
isn't touched by this PR. It isn't tested by our test suite, and I think it's not possible for a user to run that method anyway. If we want to keepconnect_eight()
, I'd advocate for doing a numba translation and adding tests at the same time in a new PR (I've opened https://github.com/brainglobe/cellfinder-core/issues/111 for this)StructureManager
intoCellDetector
(it's not possible to use onejitclass
in anotherjitclass
)After this PR, running
benchmarks_3d.py
gives:Confirming that
connect_four
runs quicker than 0.049 seconds with the conversion to numba. This is similar or better than the original Cython implementation, where it also didn't show up on the pyinstrument trace: https://github.com/brainglobe/cellfinder-core/issues/89#issue-1604899152Fixes https://github.com/brainglobe/cellfinder-core/issues/89.