Kessler is a simulation environment loosely modeled after our internal project PsiBee and the external project Fuzzy Asteroids. The game has ships that shoot bullets at asteroids to gain score. Ships can collide with asteroids and other ships and lose lives.
The current way the game does the culling, it always recreates the lists of objects even if there's nothing to be culled.
Additionally, mines can potentially remove many asteroids at once, and the existence check within the list comprehension is checking whether the index is within a list. Changing list to set will speed up this check. For the other culling, the list is probably always super small so there's no point changing to a set and incurring the additional hashing overhead, but for mines I think it's worth it.
The current way the game does the culling, it always recreates the lists of objects even if there's nothing to be culled.
Additionally, mines can potentially remove many asteroids at once, and the existence check within the list comprehension is checking whether the index is within a list. Changing list to set will speed up this check. For the other culling, the list is probably always super small so there's no point changing to a set and incurring the additional hashing overhead, but for mines I think it's worth it.