Speed up collision detection by reconfiguring shared memory usage