Repository navigation
Conversation
Exercise concentrated prefixes and an 8,000-input capacity target. Check allowed and denied reads with actual sandbox enforcement. Assisted-by: Codex, GPT-6-Astra medium
Pair adjacent first hash characters to reduce prefix guards from 32 to 16, which results in some compute time savings, esp. for large profiles. On macOS 27, median profile compilation reduced from 762 to 118 ms (6.46x) for a 1,403-input build. Compiled size increased by 0.36%. Repeated trivial build probes showed a small per-operation cost, most clearly about 2-3% slower stat on Python/Nix profiles. Ten runs of hello, Git, and Python build-phase replays found no detectable total-time change. Assisted-by: Codex, GPT-6-Astra medium
booxter
force-pushed
the
darwin-sandbox-pairs
branch
from
October 31, 2026 00:40
418058b to
2dca02a
Compare
Contributor
Author
|
For the record, I am not entirely convinced that shaving off 0.5 to a few seconds per darwinConfiguration build justifies this (even if mild) complexity. I will let maintainers to assess. Regardless, I think we should consider including the tests for large profiles to establish some regression baseline for future changes. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Bucketing performance is sensitive to the number of guards.
With the change, on macOS 27, median profile compilation reduced from 762 to 118 ms (6.46x) for a 1,403-input build. Compiled size increased by 0.36%.
Repeated trivial build probes showed a small per-operation cost, most clearly about 2-3% slower stat on Python/Nix profiles. Ten runs of hello, Git, and Python build-phase replays found no detectable total-time change.
Implementation
Pair adjacent first hash characters to reduce prefix guards from 32 to 16.
Also, added some functional tests to verify profile compilation and guard behavior for large profiles. (This piece is logically independent from the optimization but establishes the baseline as the first commit in the PR to avoid any size-sensitive regressions.)
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.