mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 12:50:04 -04:00
Optimization: replace HashSet uses with AHashSet
This commit is contained in:
@@ -39,6 +39,9 @@ bytemuck = { version = "1.7.2", features = ["derive"], optional = true }
|
||||
[features]
|
||||
default = ["default_fonts", "multi_threaded"]
|
||||
|
||||
# implement bytemuck on most types.
|
||||
convert_bytemuck = ["bytemuck", "emath/bytemuck"]
|
||||
|
||||
# If set, epaint will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = []
|
||||
@@ -52,10 +55,7 @@ extra_asserts = ["emath/extra_asserts"]
|
||||
mint = ["emath/mint"]
|
||||
|
||||
# implement serde on most types.
|
||||
serialize = ["serde", "emath/serde"]
|
||||
|
||||
# implement bytemuck on most types.
|
||||
convert_bytemuck = ["bytemuck", "emath/bytemuck"]
|
||||
serialize = ["serde", "ahash/serde", "emath/serde"]
|
||||
|
||||
single_threaded = ["atomic_refcell"]
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ pub struct Mutex<T>(parking_lot::Mutex<T>);
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
thread_local! {
|
||||
static HELD_LOCKS_TLS: std::cell::RefCell<std::collections::HashSet<*const ()>> = std::cell::RefCell::new(std::collections::HashSet::new());
|
||||
static HELD_LOCKS_TLS: std::cell::RefCell<ahash::AHashSet<*const ()>> = std::cell::RefCell::new(ahash::AHashSet::new());
|
||||
}
|
||||
|
||||
#[cfg(feature = "multi_threaded")]
|
||||
|
||||
Reference in New Issue
Block a user