Swap keys in proper place
Remove unnecessary clear of the hits
@@ -260,12 +260,10 @@ cdef class StringStore:
if self.hits.count(key) != 0:
tmp.push_back(key)
+ self.keys.swap(tmp)
strings = list(self)
self._reset_and_load(strings)
- self.keys.swap(tmp)
- self.hits.clear()
-
cdef const Utf8Str* intern_unicode(self, unicode py_string):
# 0 means missing, but we don't bother offsetting the index.
cdef bytes byte_string = py_string.encode('utf8')
