Skip to content

Exchange `std::round` with `std::nearbyintf`

Michel De Cian requested to merge decianm-roundingFunctionChange into master

Exchange std::round with std::nearbyintf, which according to callgrind is quite a bit faster (see e.g. here: https://test-lhcbpr-hlt.web.cern.ch/test-lhcbpr-hlt/PerfTests/UpgradeVelo/Throughput_lhcb-head.2202_NoCutNoFitFastForwardTBL_x86_64+avx2+fma-centos7-gcc8-opt_2019-04-11_11:05:59_+0200/ for the non-negligible contribution of rounding)

@sponce I think you wrote this, is there any disadvantage of using std::nearbyintf? I checked on 100 events that the results of the rounding are identical.

@graven As mentioned yesterday.

@chasse @jihu @sstahl

Edited by Marco Cattaneo

Merge request reports

Loading