bevy/crates/bevy_utils/src
SpecificProtagonist 8faaef17e5
Hash stability guarantees (#11690)
# Objective

We currently over/underpromise hash stability:
- `HashMap`/`HashSet` use `BuildHasherDefault<AHasher>` instead of
`RandomState`. As a result, the hash is stable within the same run.
- [aHash isn't stable between devices (and
versions)](https://github.com/tkaitchuck/ahash?tab=readme-ov-file#goals-and-non-goals),
yet it's used for `StableHashMap`/`StableHashSet`
- the specialized hashmaps are stable

Interestingly, `StableHashMap`/`StableHashSet` aren't used by Bevy
itself (anymore).

## Solution
Add/fix documentation

## Alternatives
For `StableHashMap`/`StableHashSet`:
- remove them
- revive #7107

---

## Changelog
- added iteration stability guarantees for different hashmaps
2024-02-05 17:05:15 +00:00
..
cow_arc.rs impl Borrow and AsRef for CowArc (#11616) 2024-01-30 14:27:53 +00:00
default.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
float_ord.rs Document That FloatOrd Implements Hash and Eq Too (#5228) 2022-07-11 14:11:27 +00:00
futures.rs Async pipeline compilation (#10812) 2024-02-05 13:50:50 +00:00
intern.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
label.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
lib.rs Hash stability guarantees (#11690) 2024-02-05 17:05:15 +00:00
once.rs move once from bevy_log to bevy_utils, to allow for it's use in bevy_ecs (#11419) 2024-01-19 06:07:41 +00:00
short_names.rs change 'collapse_type_name' to retain enum types (#9587) 2023-08-26 14:50:12 +00:00
synccell.rs Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
syncunsafecell.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
uuid.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00