Optimizing PHP: Sorting

from blog Blog | Pekka Laiho, | ↗ original
In the previous post we examined the potential performance issues with nested for-loops and how they can be improved using array lookups instead. Another common pitfall in terms of performance can be sorting when done incorrectly which we will examine here.