perf(hash): swap std HashMap/HashSet for rustc-hash FxHash
Phase 4.1. Handle / u64 keys dominate the hot maps (block_defn, hatch / image / mesh caches, draw-depth map, viewport wire caches); the default SipHash is wasted work on integer keys. Alias the std types to rustc_hash::FxHashMap / FxHashSet crate-wide so every map and set — including the cross-module draw-depth map shared between scene and the GPU pipelines — uses the faster hasher consistently. Mechanical: no behavioural change. Constructors moved from ::new() to ::default() (Fx variants carry no RandomState). Build + 13 tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
3098523b8d
commit
70702d063f
30 changed files with 102 additions and 98 deletions
|
|
@ -39,7 +39,7 @@ pub struct ViewportData {
|
|||
/// by the wire / face3d pipelines as a clip-z bias. WireModels carry no
|
||||
/// depth field (84 construction sites); the bias is looked up by handle
|
||||
/// at GPU-upload time from this map instead.
|
||||
pub(super) draw_depths: Arc<std::collections::HashMap<u64, f32>>,
|
||||
pub(super) draw_depths: Arc<rustc_hash::FxHashMap<u64, f32>>,
|
||||
pub(super) hatches: Arc<Vec<HatchModel>>,
|
||||
/// Wipeout fills — rendered in a separate pass AFTER wires.
|
||||
pub(super) wipeout_hatches: Arc<Vec<HatchModel>>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue