Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify assign2D to exploit NumPy indexing #709

Merged
merged 1 commit into from
Sep 8, 2022
Merged

Modify assign2D to exploit NumPy indexing #709

merged 1 commit into from
Sep 8, 2022

Conversation

sdhiscocks
Copy link
Member

Previously this used iteration rather than indexing. By changing to using indexing and vectorising some calculations, gives a performance benefit for large number of tracks/detections.

Performance difference isn't noticeable on a small cost matrix, but testing on a (1988, 4808) cost matrix results in identical output with ~50x to 60x speed up.

@sdhiscocks sdhiscocks requested a review from a team as a code owner September 6, 2022 16:02
@sdhiscocks sdhiscocks requested review from nperree-dstl and hpritchett-dstl and removed request for a team September 6, 2022 16:02
@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #709 (23cba43) into main (5276c1b) will decrease coverage by 0.03%.
The diff coverage is 83.72%.

@@            Coverage Diff             @@
##             main     #709      +/-   ##
==========================================
- Coverage   94.62%   94.59%   -0.04%     
==========================================
  Files         172      172              
  Lines        8845     8802      -43     
  Branches     1714     1698      -16     
==========================================
- Hits         8370     8326      -44     
- Misses        343      344       +1     
  Partials      132      132              
Flag Coverage Δ
integration 70.21% <83.72%> (-0.17%) ⬇️
unittests 90.74% <83.72%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
stonesoup/dataassociator/neighbour.py 94.04% <0.00%> (ø)
stonesoup/dataassociator/_assignment.py 84.05% <85.71%> (-7.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Previously this used iteration rather than indexing. By changing to
using indexing, gives a performance benefit for large number of
tracks/detections.
@sdhiscocks sdhiscocks merged commit c1a7f02 into main Sep 8, 2022
@sdhiscocks sdhiscocks deleted the assign2d branch September 8, 2022 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants