Skip to content

Commit

Permalink
use set for O(1) lookups instead of list [O(n)] (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
acannistra authored Jan 13, 2021
1 parent b7bce84 commit a2911ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion changegen/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _get_way_node_map(osm, way_idlist):
class _wayFilter(osmium.SimpleHandler):
def __init__(self, ids):
super(_wayFilter, self).__init__()
self.ids = ids
self.ids = set(ids)
self.node_map = {}

def way(self, w):
Expand Down

0 comments on commit a2911ad

Please sign in to comment.