Efficiency considerations in collision detection