Repository navigation
Conversation
… reads D196 asked, after the Minted sweep, how much of a lookup is probing. The runtime now counts, when the switch is set, the slots hm_find_slot read per lookup and reports at exit (with_exit and the shutdown's leak report): the total and average, a histogram, the totals by key kind, and the twenty maps that read most with key size, lookups, slots per lookup and len/entries/index-cap at their last lookup. A map is known by its address; the table holds 1024 and says how many lookups fell outside it. Off, the lookup pays one global load.
This was referenced Nov 8, 2026
ehartford
marked this pull request as ready for review
November 8, 2026 18:00
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.
For #3087 (the D196 follow-up):
WITH_TRACE_HM_PROBES=1counts the index slots every HashMap/HashSet lookup reads and reports at exit: total and mean, a histogram, totals by key kind, the twenty live maps that read most (key size, lookups, slots per lookup, len/entries/index-cap), and the freed maps aggregated by kind. Off, a lookup pays one global load. Documented in deep-debugging-tools.md's switch table; fixturetest/behavior/behav_3087_hm_probe_trace.w.The measurement it gave (posted on #3087):
check src/main.wperforms 2.6 billion lookups at 1.17 slots each, 89% in one slot, so probing is at its floor; 90% of the lookups are on 40,178 minted-keyed maps created and freed during the check. The next step there is naming the creation sites, not the hasher.Battery runs on this PR for the whole stack (#3089, #3090, #3091).