Speed optimisations of PixelDiodeMatrix
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 ratherindex > 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.