Cartesian Routing Performance
I've been using the cartesian product routing for finding routes on grids, but the performance is somewhat lacking. For grid sizes of 5×5 I get the following profiling results:
Now I understand that hopcroft-karp may be hard to avoid calling multiple times, but why does bulk_swap take so much time? It really should just be calling the underlying permuters and maybe translating the swaps onto the grid. What else is it doing?