Repository navigation
binary search the dispatch lookup when ranges are irregular - #35
Open
dougchansan wants to merge 1 commit into
Open
dougchansan wants to merge 1 commit into
dougchansan wants to merge 1 commit into
Conversation
This was referenced Oct 9, 2026
dougchansan
force-pushed
the
fix/dispatch-search-lookup
branch
from
October 10, 2026 19:11
c0b8ad1 to
639e19e
Compare
40637c4 splits llvm ranges at every function boundary, so the linear dispatch lookup grew from 2 checks to ~7000 per dispatch. emit a sorted table and binary search it once there are more than 16 runs.
dougchansan
force-pushed
the
fix/dispatch-search-lookup
branch
from
October 10, 2026 21:14
639e19e to
081fb52
Compare
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.
40637c4 started splitting llvm ranges at function boundaries. the default dispatch lookup only collapses equal-stride runs, so
dolrecomp_find_originalwent from 2 checks to ~7000 sequential ones, and it runs on every return to the runner. llvm modules ended up 7-30x slower than the c backend, and mkddrace.savhung.this emits a sorted table and binary searches it once there are more than 16 runs. a small number of runs keeps the existing linear form. overlapping ranges also stay linear to keep first-match order. a coverage guard in the old
address >= ... && address < ...form rejects out-of-range addresses first, and keeps module-table generators that scrape it working.frames in 20s, recompcore runtime:
added tests in
test_dispatch.c.