Avoid repeated work when building and looking up host drive mounts #34
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/JamesCicada--GTAVI-Recomp!34
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-34"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@RavenCurseBurg on GitHub · 2026-11-26 06:29 UTC · original
RavenCurseBurg:perf/posix-mount-lookup→main· +40 −41 · 2 files · 2 commits · openDriveMap::default_map()generates 26 distinct, normalized entries but then sends them through the arbitrary-input validator, which checks for duplicates and builds a second vector. This constructs the default map directly in one reserved vector. Custom mappings still use the existing validation.The other commit reuses the longest-prefix match in
posix_to_windows(). It removes a second normalization and a search for a mount just matched by drive. Both changes preserve the public interface.-O3), seven alternating trials of 200,000 default constructions each measured a median of 826 → 243 ns per construction and 7 → 1 heap allocations. The comparison for this measurement used the first commit as its baseline. The regression checks all 26 drive letters.mainbyte for byte and passed all three native CTests. The earlier lookup comparison also passed on both MSVC and Ubuntu GCC. Windows and Linux comparisonI repeated the default-map benchmark against
mainon two hosted runners. Construction used 10 → 1 allocations on Windows/MSVC (1,684 → 328 ns) and 7 → 1 on Ubuntu/GCC (884 → 328 ns). Both runners also confirmed all 1,848 public lookup results matchedmain. Windows job · Ubuntu job · Benchmark sourceTimings measure the host-side utilities. AI-assisted with Codex + GPT-6.2 Astra (xhigh).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.