PGO hot list: the game's Zstd decoder at the hot flags whatever the profile says #909
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!909
Loading…
Reference in a new issue
No description provided.
Delete branch "perf-zstd-hot-set"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
scripts/hotlist.pynow always adds the game's Zstd decoder to the hot list, after the functions the profile picks. That's the 22 functions of the decode tree underf_80115c80, called from the job loop'sf_80115bf0. They then build in the hot chunks (-O2, with the PGO profile) instead of the cold -O1 chunks.The shipped
work/hot_funcs.txtcomes from the release tools, not from git. So this takes effect when the list is next regenerated, or when these 22 names are added to the shipped list directly.Why
The decoder runs while areas load and stream. A sampled play profile seldom catches it, so it never made the hot set. Stutter on entering an area, and load times, partly wait on it.
I measured each decoder function on its own (harness below). Compiled the way the build compiles today vs. as hot code, median of 5 batches:
f_801117a0at −27%.hot_order.txtis unchanged, so today's hot code keeps its layout.Testing
test_insn(44,172 cases) andtest_leaf(2,091 functions plus 978 call trees,--calls) pass with this list and two other lifter changes applied to v2.0.3.Not done: a timed area-load comparison in game.
🤖 Generated with Claude Code