Repository navigation
Conversation
With aggregation on the evaluating thread, keying a consented evaluation's bucket walked its copied context a second time to hash it: 7% of evaluating-thread time on the variations benchmark. The hook's copy is now a HashedContext, which adds each entry's share of the order-independent hash as it is put, and the aggregator takes that hash instead of walking the map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LLM ValidationLLM Validation Gate — java-agent-instructions✅ PASS
6 case(s) · quality 81.3 → 81.4 (0.0) · win-rate 49% [45%–53%] Details — analysis and per-case resultsAnalysisChanged instruction file(s): 1 case(s) dipped but stayed within the pass bar.
Results
Cases
Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs. |
Contributor
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Contributor
Author
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.
What Does This Do
Stacked on #13622.
With aggregation on the evaluating thread (#13622), keying a consented evaluation's bucket walks its copied context a second time to compute the order-independent context hash. That moved a cost the queue path paid on its worker onto the calling thread: 7.2% of evaluating-thread time on
scale/variations, and +6.9% per evaluation at equal work.The hook's bounded context copy (
DDEvaluator.copyPrunedContext) now fills aHashedContext, aHashMapthat adds each entry's share of the hash as it's put, keeping it correct across replacements, removals and clears.ConcurrentFlagAggregator.contextHashreturns that cached hash when it's given aHashedContextand walks any other map as before, with both computing the same value.record's signature is unchanged.Motivation
This removes the extra walk over every consented context on the calling thread. The copy itself remains; copying only when a new bucket is created is a possible follow-up.
Measurement: no gain, and why
A benchmark worker ran
ClientEvaluationBenchmarkscale/variations(paced, 4 threads, 5 forks per build, rotated, 27% steal):No recovery: a profile of the calling thread shows
ConcurrentFlagAggregatorat 6.9% on Aggregate flag evaluations on the evaluating thread (FFE optimization) #13622 and 7.2% with this PR.Why: an earlier profile attributed that share to hashing the context, but breaking down the stacks shows it's the features map:
matchesDegradedcomparing a bucket's features map with the evaluation's (AbstractMap.equals), on every degraded-tier hit;featureMap.hashCode()on every evaluation.The context walk barely registers.
Where the fix is: both costs come from the hook building a fresh features map per evaluation. Pass a split's prepared evaluation features to the hook by handle (FFE optimization) #13611 passes each split's prepared map instead, with its hash cached, so the comparison becomes an identity check and the hash a cached field.
Aggregate flag evaluations on the evaluating thread (FFE optimization) #13622's gap on
variations: in this run it's +2.8% with overlapping ranges, so the earlier +6.9% was partly noise.Additional Notes
🤖 Generated with Claude Code