Repository navigation
Conversation
…dule Moves the toolbox primitives that have no dependencies outside the JDK out of internal-api, with their tests: Hashtable, FlatHashtable, StringIndex, ChunkedBuffer, Cursor, Maybe, the hashing utilities, BitUtils and FNV64Hash, plus the contract annotations and the Strategy, StrategyConsumer and NoEscape markers. Package names do not change, and internal-api re-exports the module, so callers are unchanged. Strings.caseInsensitiveHashCode moves to HashingUtils, which FlatHashtable uses. Strings keeps the method and delegates to it. The agent's shared and per-product jars exclude the module, as they do the other bootstrap components, so each class is packaged once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The moved classes passed under internal-api's thresholds (0.7 branch, 0.8 instruction). The new module got the 0.9 default instead, which failed coverage verification for seven of them. Using internal-api's thresholds keeps enforcement exactly as it was before the move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing calls the Strings delegate, so drop it and move its test next to HashingUtils. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cies The toolbox was extracted from internal-api, so it keeps the strict core performance rules in AGENTS.md and the perf-review posture. Its lockfile now covers the test configurations too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It only depends on toolbox classes, plus TriFunction, which moves with it in the same package, as Strategy did. internal-api exposes the toolbox as an api dependency, so its users compile unchanged. The size-manager test polls the thread state itself rather than through test-utils, so the toolbox tests keep junit as their only dependency, and hashIterator gets a direct test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConcurrentHashtable, StringIndex and FlatHashtable are on master and now live in components/toolbox; StringCanonicalizer and LruTable are coming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EscapeShapeBenchmark's arms are mergeWithStatic and mergeOfTwoAllocations now, and "merge of several allocations" replaces the compiler term "phi". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LongHashingUtils.mix is the SplitMix64 finalizer, for combining hashes whose raw values are correlated. unorderedEntryHash gives one entry's share of an order-independent hash, mixing it so that entries can't cancel each other the way Map.hashCode's key ^ value terms do, and unorderedHash adds those shares up over a map. The FFE aggregator keys evaluation contexts with this scheme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LLM ValidationLLM Validation Gate — java-agent-instructions✅ PASS
6 case(s) · quality 81.4 → 81.3 (-0.1) · win-rate 50% [47%–53%] Details — analysis and per-case resultsAnalysisChanged instruction file(s): No safety or blocking-case regressions across 6 case(s). Overall pairwise win-rate 50% [47%–53%], quality -0.1 — see the verdict above for whether that clears the noise band. 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. |
HashingUtils mirrors LongHashingUtils, so it gains mix (MurmurHash3's fmix32 finalizer), unorderedEntryHash and unorderedHash: a better-mixed alternative to Map.hashCode for a key's hashCode(). They are native 32-bit versions rather than truncations of the 64-bit ones, and the Javadoc points identity-critical keys to the 64-bit hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/toolbox-component
branch
2 times, most recently
from
November 24, 2026 02:03
5c9275f to
0dbdb72
Compare
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.
What Does This Do
Stacked on #13531.
Adds three methods to the toolbox's
LongHashingUtils, and their 32-bit counterparts toHashingUtils:mix(long): the SplitMix64 finalizer, where every input bit affects every output bit. It's for combining hashes whose raw values are correlated. To pick a table slot, a cheaper spread is enough.unorderedEntryHash(long keyHash, long valueHash): one entry's share of an order-independent hash of a map. Add the shares of all entries (and the size) to get a hash that doesn't depend on iteration order. Each share is mixed, so entries can't cancel each other the wayMap.hashCode'skey ^ valueterms do:{a=0, b=0}and{a=1, b=1}collide underMap.hashCode, but not here. The caller chooses the value hash, and no entry object is needed.unorderedHash(Map): those shares added up over a map, using the keys' and values' own hash codes.32-bit counterparts in
HashingUtils:mix(int)is MurmurHash3'sfmix32finalizer.unorderedEntryHash(int, int)andunorderedHash(Map)follow the same scheme as the 64-bit versions. They're native 32-bit versions rather than truncations, which is cheaper.hashCode()over a map or set, as a better-mixed alternative toMap.hashCode. The Javadoc notes that 32 bits collide sooner (likely somewhere past about 65k distinct maps) and points keys whose identity is the hash to the 64-bit version.Motivation
The FFE flag-evaluation aggregator (#13609, #13622) keys each consented evaluation by its context with this scheme, but kept the mixer and the per-entry step to itself. Moving them here makes the order-independent hash reusable wherever a map's contents are a key, without allocating entry or key objects.
Additional Notes
Map.hashCode's XOR collisions; null and empty maps are handled; andunorderedHashis the sum of the entry shares.🤖 Generated with Claude Code