lima/vecgeom-421 - Performance optimizations for the trapezoid
This request contains more performance improvements for the trapezoid, especially for Inside() and Contains() methods.
The [WIP] flag is due to a new function, EarlyReturnAllowedAt(vecSize), in file VecCore/include/VecCore/Backend/Implementation.h, which is useful to perform fine-grained studies for the effect of early returns for scalar and vectorized backends.
Please find a few performance plots attached: First plot is for CPU times, second is for Speedups, taking "specialized" shapes as reference (speedup=1). See below for more plot details:
Colors used for the plots:
- Black: vectorized
- Red: unspecialized
- Green: specialized
- Blue: ROOT
- Magenta: USolids
- Cyan: Geant4
In addition, each dataset has 10 data points, for which the first 5 points are for PLANESHELL=ON (default) and the last 5 datapoints for PLANESHELL=OFF. Each configuration (5 points) shows performances for 5 commits, in the following order:
- 68c48276 - tag v0.3.rc
- 4e5928c1 - tag v00.03.00
- 019d29a0 - includes performance improvements to DistanceToIn() and DistanceToout(), merged with request 384
- b356bad1 - includes new algorithms for NormalKernel(), merged with request 415
- 2c007289 - includes performance improvements to SafetyToOut(), Inside() and Contains() [part of this merge request]