Replace 3x arguments and a return value with a structure that stores the neighboring edges & loops. Also call add_without_duplicates from a loop instead of inlining.
Replace 3x arguments and a return value with a structure that stores the neighboring edges & loops. Also call add_without_duplicates from a loop instead of inlining.