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
Branchless MVA #13143
Branchless MVA #13143
Conversation
A new Pull Request was created by @VinInn (Vincenzo Innocente) for CMSSW_8_0_X. It involves the following packages: CondFormats/EgammaObjects @diguida, @cerminar, @cmsbuild, @franzoni, @ggovi, @mmusich, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
The tests are being triggered in jenkins. |
do { | ||
auto r = fRightIndices[index]; | ||
auto l = fLeftIndices[index]; | ||
index = vector[fCutIndices[index]] > fCutVals[index] ? r : l; |
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.
Does the compiler really produce worse code if these three lines were replaced by
index = vector[fCutIndices[index]] > fCutVals[index] ? fRightIndices[index] : fLeftIndices[index];
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.
yes,
because no where is explicitly said that if
vector[fCutIndices[index]] > fCutVals[index] is true fLeftIndices[index] exists
obvious in
a = p ? p->k : 0
here you cannot evaluate the two options as if p il null the first will segfault
indeed a tree could be implemented in some strange way that not all right and left node exists for a given index...
Alright looks good to me. |
+1 |
Jenkins seems to confirm absence of regression |
@slava77 , did not notice you were absent from the official subscribers p.s. |
the point is that it SHOULD wait on @slava77 .... |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar |
On 2/2/16 7:18 AM, Vincenzo Innocente wrote:
I've seen this and the fact that there are no regressions.
|
no change on persistent data attributes... |
@VinInn |
@slava77 , actually I used perf (I am writing a note on that) |
On 2/2/16 7:38 AM, Vincenzo Innocente wrote:
Is this a new version?
|
consistent: 3.7% of tracking at PU20, 1% of total at PU35 |
+1 |
avoid conditional loads to allow the compiler to emit branchless code
for the tracking MVA is a 35% speedup
regression tested with the code in 8c2964a