Switch from using an adjacency set to an adjacency list, which offers equal or better performance.