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:
Hakan SevenandClaude Opus 4.8 committed 2026-06-05 00:35:53 +03:00
1 parent 3098523b8d
commit 70702d063f
30 files changed
+102 -98

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@
//! adds or removes that pill from the bar. The choice is persisted so it
//! survives across sessions.
use std::collections::HashSet;
use rustc_hash::FxHashSet as HashSet;
use std::path::PathBuf;
/// Identifies a toggleable status-bar pill.
@@ -121,7 +121,7 @@ pub struct StatusBarConfig {
impl StatusBarConfig {
/// Load the saved customization, or all-visible when none exists.
pub fn load() -> Self {
let mut hidden = HashSet::new();
let mut hidden = HashSet::default();
if let Some(path) = config_path() {
if let Ok(body) = std::fs::read_to_string(path) {
for line in body.lines() {