reorder intersections to improve performance

There are usually lots more vias than net polys/vertices, so it makes
sense to check for overlap between nets before looking for vias.
This commit is contained in:
Jan Petykiewicz 2022-04-05 18:22:47 -07:00
parent 79d41ddeb3
commit 81746e6a5f

View File

@ -317,8 +317,8 @@ def find_merge_pairs(
continue continue
if via_polys is not None: if via_polys is not None:
via_top = intersection_evenodd(top_polys, via_polys) top_bot = intersection_evenodd(top_polys, bot_polys)
overlap = intersection_evenodd(via_top, bot_polys) overlap = intersection_evenodd(top_bot, via_polys)
else: else:
overlap = intersection_evenodd(top_polys, bot_polys) # TODO verify there aren't any suspicious corner cases for this overlap = intersection_evenodd(top_polys, bot_polys) # TODO verify there aren't any suspicious corner cases for this