Loadout Optimizer: remove optimizations that measured at noise - #11877
Closed
delphiactual wants to merge 3 commits into
Closed
Loadout Optimizer: remove optimizations that measured at noise#11877delphiactual wants to merge 3 commits into
delphiactual wants to merge 3 commits into
Conversation
An ablation benchmark measured this memo at 0.96-1.01x across synthetic and real-vault scenarios: the convergence gate and the cheap upper-bound check already keep the binary search rare, and chooseAutoMods memoizes the underlying solves, so the second memo layer never paid for itself. buildContextKey and packStatNeeds become private to auto-stat-mod-utils.
An ablation benchmark measured the SetEnergyCache at 0.99-1.03x across every scenario, including the locked-activity-mods case it was built for: in practice updateMaxStats and pickOptimalStatMods rarely both run for the same set, so the shared cache almost never gets a hit. Callers just compute the energy assignments where needed.
delphiactual
added a commit
that referenced
this pull request
Jul 10, 2026
An ablation benchmark measured this pre-check at 0.97-1.05x everywhere: updateMaxStats already skips converged stats internally via the MAX_STAT check and the cheap single-stat upper bound, so the duplicated external mirror of those conditions wasn't buying anything.
delphiactual
force-pushed
the
lo-remove-nonpaying-opts
branch
from
July 10, 2026 12:52
b898b23 to
2824088
Compare
Contributor
Author
|
measuring in node only is not great, building a playwright test harness... |
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.
Requires #11874
Follow-up to the review feedback on #11868 about undoing optimizations that aren't meaningful. I ran an ablation study over the LO worker optimizations: each one was toggled off individually and benchmarked interleaved against the full configuration in the same run (5 rounds, min-over-rounds, so clock drift can't skew ratios), on synthetic corpora and a real vault profile, with the parity suite verifying every ablated configuration still produces identical results. Four optimizations measured at or below noise (0.96x to 1.05x) in every scenario, so this removes them, one commit each:
updateMaxStats. The internal MAX_STAT and single-stat upper-bound checks already keep the binary search rare, andchooseAutoModsmemoizes the underlying solves, so the second memo layer never paid for itself. Also letsbuildContextKey/packStatNeedsgo private toauto-stat-mod-utils.updateMaxStatsandpickOptimalStatModsrarely both run for the same set, so the sharedSetEnergyCachealmost never got a hit, including in the locked-activity-mods scenario it was built for.updateMaxStats. It mirrored conditions the function already enforces internally.Combined verification: parity and all loadout-builder tests pass, and the A/B bench against the frozen baseline is unchanged with all four removed together (15.9x/2.5x/10.0x vs the 15.0x/2.4x/10.2x reference on the same code shape), so there's no pairwise interaction between the removals.