You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, MarkCache and MinMaxIndexCache use LRUCache to manage the mapping. We hash the file path into UInt128, so that it is easy to use an unordered_map. Although it is efficient, the hash algorithm can still have chances of conflicts. i.e. two different paths share the same hash_code. We cannot tolerate the conflict, because it will cause data error or exceptions.
Instead of relying on hash code, we can use std::map<Path, Value>. In sacrificing some efficiency, we gain correctness.
The text was updated successfully, but these errors were encountered:
Currently, MarkCache and MinMaxIndexCache use LRUCache to manage the mapping. We hash the file path into UInt128, so that it is easy to use an unordered_map. Although it is efficient, the hash algorithm can still have chances of conflicts. i.e. two different paths share the same hash_code. We cannot tolerate the conflict, because it will cause data error or exceptions.
Instead of relying on hash code, we can use
std::map<Path, Value>
. In sacrificing some efficiency, we gain correctness.The text was updated successfully, but these errors were encountered: