Skip to content

Performance improvements for System::getProcessTime (now ~30% faster)

Frank Winklmeier requested to merge fwinkl/Gaudi:getProcessTime into master
  • 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

Merge request reports