mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-24 14:53:21 -07:00
`Location` does not override `__eq__` so should not override `__hash__`. With this patch, this makes operations on sets of locations slightly faster because they will use `object.__hash__` rather than `Location.__hash__`. `object.__hash__` is about 4 to 5 times faster than `Location.__hash__` for me. Generation often uses sets of locations, so this slightly speeds up generation. The only place I could find that was hashing locations directly was `WitnessLocationHint.__hash__`, but it has implemented a matching `__eq__`, so is fine. For security reasons, Python randomizes its hash seed each time it is started, so the result of the `hash()` function is nondeterministic and can't have been used by worlds for anything that needed to be deterministic and can't have been used to compare information hashed at generation time to information hashed by a client.
78 KiB
78 KiB