Skip to content

Commit a2911ad

Browse files
authored
use set for O(1) lookups instead of list [O(n)] (#5)
1 parent b7bce84 commit a2911ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

changegen/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _get_way_node_map(osm, way_idlist):
3737
class _wayFilter(osmium.SimpleHandler):
3838
def __init__(self, ids):
3939
super(_wayFilter, self).__init__()
40-
self.ids = ids
40+
self.ids = set(ids)
4141
self.node_map = {}
4242

4343
def way(self, w):

0 commit comments

Comments
 (0)