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
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
// Dropdown items within a group are collected into columns of 3 rows.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use rustc_hash::FxHashMap as HashMap;
|
||||
|
||||
use acadrust::types::{Color as AcadColor, LineWeight};
|
||||
use iced::widget::{button, column, container, mouse_area, row, scrollable, svg, text};
|
||||
|
|
@ -73,7 +73,7 @@ impl Ribbon {
|
|||
wireframe: false,
|
||||
ortho_mode: true,
|
||||
open_dropdown: None,
|
||||
last_cmd: HashMap::new(),
|
||||
last_cmd: HashMap::default(),
|
||||
layer_names: vec!["0".to_string()],
|
||||
active_layer: "0".to_string(),
|
||||
layer_infos: vec![LayerInfo {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Shared rendering helpers, button styles, colours, layout constants, and
|
||||
// free functions used by the Ribbon view/overlay methods.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use rustc_hash::FxHashMap as HashMap;
|
||||
use std::time::Duration;
|
||||
|
||||
use acadrust::types::{Color as AcadColor, LineWeight};
|
||||
|
|
|
|||
Loading…
Reference in a new issue