You can improve on that by putting the objects on a grid and letting the broadphase only check for potential collisions within a cell of the grid (and keeping in mind that an object can span multiple cells)


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com