1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Optimize: more inlining and more use of AHashMap

No real gains, but it didn't hurt either
This commit is contained in:
Emil Ernerfeldt
2021-03-31 17:06:12 +02:00
parent 4984d51f99
commit 4808da44a2
9 changed files with 32 additions and 6 deletions

View File

@@ -1,9 +1,11 @@
use std::{
collections::{BTreeMap, HashMap},
collections::BTreeMap,
hash::{Hash, Hasher},
sync::Arc,
};
use ahash::AHashMap;
use crate::{
mutex::Mutex,
text::{
@@ -390,7 +392,7 @@ struct CachedGalley {
struct GalleyCache {
/// Frame counter used to do garbage collection on the cache
generation: u32,
cache: HashMap<LayoutJob, CachedGalley>,
cache: AHashMap<LayoutJob, CachedGalley>,
}
impl GalleyCache {