improve collision detection performance