Performance improvements for System::getProcessTime (now ~30% faster)
- Increase test coverage and add performance check to test_GaudiTiming - Remove unnecessary calls to getpid (saves ~10ns per query() call): - Remove getpid calls in case pid is -1 (self) - Remove ugly define that was hiding the getpid() calls in the source code - Switch from getrusage() to times() (saves ~100ns per call) - Only create ProcessHandle for Windows - Add templated version of currentTime() so it can be inlined - Allow System::getProcess to be inlined (move Windows code to constructor) - Remove private caches for query() calls as those were not used
Showing
- GaudiKernel/GaudiKernel/Timing.h 41 additions, 1 deletionGaudiKernel/GaudiKernel/Timing.h
- GaudiKernel/src/Lib/ProcessDescriptor.cpp 124 additions, 124 deletionsGaudiKernel/src/Lib/ProcessDescriptor.cpp
- GaudiKernel/src/Lib/ProcessDescriptor.h 7 additions, 7 deletionsGaudiKernel/src/Lib/ProcessDescriptor.h
- GaudiKernel/src/Lib/Timing.cpp 16 additions, 15 deletionsGaudiKernel/src/Lib/Timing.cpp
- GaudiKernel/tests/src/test_GaudiTiming.cpp 58 additions, 2 deletionsGaudiKernel/tests/src/test_GaudiTiming.cpp
Loading
Please register or sign in to comment