Improved calculation to reduce MM L1 trigger simulation computation time
Following up the recent improvements reported in ATR-25528, a few other changes to reduce CPU time:
- Removed unused member
- Made division into multiplication
- Reduced the number of multiplications
- Retrieved road overlap variables as
unsigned short int
to reduce memory allocation
This is the situation now, after the changes - Reference at !59396 (merged), same conditions to have an apple to apple comparison (it seems another ~50% gain):
4.77s 20.18% 20.18% 5.77s 24.41% MMT_Road::containsNeighbors
2.47s 10.45% 30.63% 2.47s 10.45% _init
2.06s 8.71% 39.34% 2.09s 8.84% MMT_Road::incrementAge
0.81s 3.43% 42.77% 0.81s 3.43% diamond_t::diamond_t
0.42s 1.78% 64.81% 6.74s 28.51% MMT_Road::addHits
As the changes involve a rearrangement of the computation only, no differences are expected (and found, actually)
./cc @vadamico
Edited by Francesco Giuseppe Gravili