Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preventing resize overuse in SortVisibleSpans
Adding an if check to resize the buffers only when there is a risk of an overflow. Every pass through is resizing the scratch buffers in SortVisibleSpans. Resize is completely deallocating and reallocating the buffers. This is resulting in a ~5% performance drag - so this change results in a ~5% performance improvement on the main loop. It’s possible this is a result of 78c0b48 which moved this storage over to std. I don’t know if the Cyan array implementation would have handled this. I don’t see any reason this would create issues - there doesn’t seem to be code that relies on the size of the vectors. The vectors only need to be correctly sized to fit all the data required.
- Loading branch information