Skip to content

Speed optimisations of PixelDiodeMatrix

Tadej Novak requested to merge tadej/athena:pixeldiodematrix into master

Additional speed optimisations of PixelDiodeMatrix:

  • precompute 1/pitch and use that for calculations
  • reuse bool outOfBounds = index >= m_numCells; calculation
  • do not check index < 0 but rather index > 0 and only do actions when needed
  • (also fixed some whitespace)

This yields about 40% faster execution. There may be some numerical differences at the end. Let's see what the CI will say.

/cc @nstyles @jchapman @tdado

Merge request reports

Loading