-
Notifications
You must be signed in to change notification settings - Fork 157
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
refactor!: Reduce heap allocations in navigation #1124
refactor!: Reduce heap allocations in navigation #1124
Conversation
@asalzburger what do you think? |
Codecov Report
@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
- Coverage 48.16% 48.13% -0.04%
==========================================
Files 341 341
Lines 17646 17660 +14
Branches 8327 8342 +15
==========================================
+ Hits 8499 8500 +1
Misses 3372 3372
- Partials 5775 5788 +13
Continue to review full report at Codecov.
|
@paulgessinger Try re-running the benchmark with more runs. "just outside 2 sigmas" on 5 runs is not enough to claim a significant difference on benchmark timings, whose probability law is not normal. |
Sure. This is what I get with 30 runs on main
and on this PR
The means seem roughly consistent with before. I can run again with even more samples. Overall, this isn't a huge performance improvement, I agree. But looking at the propagation profile, at least I can't see any great singular optimization opportunities, where we could get a large increase in performance in one go. It rather seems like there's a number of smaller optimization opportunities that in total could be a net positive. |
The changes look good, can you resolve the conflicts in Layer.hpp and Layer.cpp? |
This PR changes the storage values in
Navigator
to useboost::container::small_vector
for layers, sensitive and boundary surfaces. At the same timeLayer::compatibleSurface
,TrackingVolume::combatibleBoundaries
andTrackingVolume::compatibleLayers
are modified to return this container.This PR contains the changes from #1119, so should be merged afterwards.
I benchmarked this with the EigenStepper without covariance transport, as this shouldn't be affected by this change.
On main I get:
while on this branch I get
for 1000 tracks per event and 20000 events each.
The measurements seem to be just outside about 2sigma, if we take the mean at face-value, it goes down by about 3%.