diff options
author | HampusM <hampus@hampusmat.com> | 2024-12-20 21:27:48 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-12-20 21:27:56 +0100 |
commit | be7d20f0c57cc834e943426090fe2debf76ca98d (patch) | |
tree | 8b81d1dd06bc7d486120f993e3e3e70e48cb34c6 /ecs/src/system/stateful.rs | |
parent | cd30a25d2a75cadfe990ae6c1ae2eca5d927a8a7 (diff) |
perf(ecs): use hashbrown's HashMap & HashSet
Hashbrown's HashMap & HashSet is faster than std's. I
guess this is because std (which uses hashbrown) does
not enable hashbrown's default-hasher flag and instead
uses a slower hasher.
Diffstat (limited to 'ecs/src/system/stateful.rs')
-rw-r--r-- | ecs/src/system/stateful.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs index 5eae1da..80ac346 100644 --- a/ecs/src/system/stateful.rs +++ b/ecs/src/system/stateful.rs @@ -1,7 +1,7 @@ use std::any::{Any, TypeId}; -use std::collections::HashMap; use std::panic::{RefUnwindSafe, UnwindSafe}; +use hashbrown::HashMap; use seq_macro::seq; use crate::component::Component; |