Skip to content

batch ALT lookups#199

Merged
7layermagik merged 3 commits intodevfrom
palmer/batchalt
Feb 1, 2026
Merged

batch ALT lookups#199
7layermagik merged 3 commits intodevfrom
palmer/batchalt

Conversation

@palmerlao
Copy link
Collaborator

I profiled LoadBlockAccounts in more detail and I saw these sequential disk reads:
image

I think it is the ALT lookups, which used to be looked up with a for { ... GetAccount ... }. This PR changes it to use GetAccountsBatch. I found it to save about 5ms per slot over 3000 slots:

mithril-baseline.log:
  n=2999 mean=0.2167 p10=0.1490 p25=0.1770 p50=0.2120 p75=0.2580 p90=0.2960
mithril-batchalt.log:
  n=2999 mean=0.2116 p10=0.1450 p25=0.1720 p50=0.2060 p75=0.2540 p90=0.2892
image

@7layermagik 7layermagik merged commit 61d8e92 into dev Feb 1, 2026
1 check passed
@palmerlao palmerlao deleted the palmer/batchalt branch February 1, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants