File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,16 +515,16 @@ def _iter_sims(self) -> Generator[Commonality]:
515515 # Cache hash_lineset results: each lineset is compared against every
516516 # other, so without caching it gets hashed (N-1) times.
517517 cache : dict [int , LineSetHashResult ] = {}
518- for idx , lineset in enumerate (self .linesets [:- 1 ]):
518+ for idx , lineset1 in enumerate (self .linesets [:- 1 ]):
519519 for lineset2 in self .linesets [idx + 1 :]:
520- lid1 = id (lineset )
521- if lid1 not in cache :
522- cache [lid1 ] = hash_lineset (lineset , min_lines )
523- lid2 = id (lineset2 )
524- if lid2 not in cache :
525- cache [lid2 ] = hash_lineset (lineset2 , min_lines )
520+ key1 = id (lineset1 )
521+ if key1 not in cache :
522+ cache [key1 ] = hash_lineset (lineset1 , min_lines )
523+ key2 = id (lineset2 )
524+ if key2 not in cache :
525+ cache [key2 ] = hash_lineset (lineset2 , min_lines )
526526 yield from self ._find_common (
527- lineset , lineset2 , cache [lid1 ], cache [lid2 ]
527+ lineset1 , lineset2 , cache [key1 ], cache [key2 ]
528528 )
529529
530530 def get_map_data (self ) -> list [LineSet ]:
You can’t perform that action at this time.
0 commit comments