Lines Matching refs:map
59 def hash_insert(map, key, value):
61 pos = hash % len(map)
64 print(' insert %s: start at %u/%u -- ' % (key, pos, len(map)), end='')
66 if map[pos] is None:
70 map[pos] = (key, value)
74 if map[pos][0] == key:
76 pos = (pos + 1) % len(map)
79 def hash_find(map, key):
81 pos = hash % len(map)
86 if map[pos] is None:
88 elif map[pos][0] == key:
89 return attempts, map[pos][1]
91 pos = (pos + 1) % len(map)
153 map = [None] * int(len(entries) * table_size_mult)
159 hash_insert(map, qstr, line)
164 attempts, line = hash_find(map, qstr)
170 stats = len(map), len(entries) / len(map), total_attempts / len(entries)
177 for row in map: