-
Notifications
You must be signed in to change notification settings - Fork 168
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!: compile-time DetectorMeasurementInfo for SSS #2108
refactor!: compile-time DetectorMeasurementInfo for SSS #2108
Conversation
it looks good to me. Do you have an estimate of the timing gain due to this? |
Codecov Report
@@ Coverage Diff @@
## main #2108 +/- ##
==========================================
- Coverage 49.53% 49.52% -0.01%
==========================================
Files 453 453
Lines 25692 25695 +3
Branches 11819 11813 -6
==========================================
Hits 12726 12726
- Misses 4583 4586 +3
Partials 8383 8383
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually faster due to the template parameter? If this is consistent for the entire SP loop, the branch prediction should make a runtime if equally fast, I would think.
Also: is it possible to decouple the config changes from the other changes, somehow?
EDIT: Oh, I see this partially contains #2067.
Indeed @paulgessinger the config changes are also in another PR. Not sure if we want them here or there. Concerning why we want to remove one of the config parameters see the discussion here: #2067 (comment) Concerning the timing: we indeed expect the code to be faster with these compile-time if statements. This has already been demostrated with #2013 and by Luis' studies. He observed that having two separate functions for SSS and PPP makes us reache ~the same timing performances of Athena. The compile-time ifs are a way to avoid code duplications while achieving that |
Thanks @CarloVarni. I see, it's surprising to me, but ok. I really would think if the if variable doesn't change, it should effectively be skipped. |
In the case of this PR I still need to test it the performance gain comes from the changes from #2067 or actually because of the if statements |
from my comparison in Athena, just changing the if statements it improves around 2-3% |
Could you do me a favor @LuisFelipeCoelho and recheck the timing where you keep everything as is in this PR but change the enum parameter to a runtime argument, rather than a template parameter? Otherwise: should we get this in for |
What's the plan for this @LuisFelipeCoelho ? |
Hi @LuisFelipeCoelho there are merge conflicts. Can you resolve them? |
This is my first attempt to implement compile-time DetectorMeasurementInfo for SSS, as alternative to PR #1985 and following the same approach by @CarloVarni #2013