Broadphase
From Box2D Wiki
The broadphase is an internal part of the Box2D engine that loosely determines what shapes are likely to collide with each other. This list is then passed to the narrowphase, which checks them more thoroughly. Broadphases are important as they make it inexpensive to have very large worlds filled with relatively few collisions. Even in a pile of bodies, with many collisions, there are still many more possibly pairings than there are actual contacts.
Box2D uses a method called sweep and prune for its broadphase, which is handled by b2BroadPhase. It keeps track of the swept AABB of each shape, and sorts the start and end of each AABB for each axis. It then monitors changes in the order of each of these sorted lists, and updates the list of overlapping pairs accordingly. Because the lists largely stay the same from frame to frame, this is an efficient way of exploiting temporal coherence.
The broadphase subsystem is largely standalone from the rest of the physics engine, enabling it to be useful on it's own. Thus, internally it maintains it's own objects which mirror physical ones, specifically proxies represent shapes and pairs represent contacts.
