1bec355 ("improve llvm backend") and 0137523 ("Add native register ABI") incorporate the changes from #21, #22 and #23 -- thanks for folding those in. Measuring current main against the PR branches on the same runtime build and pinned savestates, though, shows a large performance regression:
| title / scene |
PR #23 branch |
current main |
runtime |
Mario Kart DD, bench.sav, capped |
51.0 fps |
10.0 fps |
same binary |
| Colosseum, Phenac scene, capped |
25-29 fps |
2.4 fps (vps 4.9) |
same binary |
Counters for the Colosseum runs show the same per-cycle hook-fallback rate on both builds, but guest throughput collapses ~12x on main (1.09G cycles retired vs 13.3G in an equal window), so the cost is in the generated code itself rather than in fallback traffic. The native ABI applies automatically per function via nativeABIFlags() with no opt-out flag, so there is no way to A/B it from a built module -- an env or CLI gate would make this easy to bisect.
Setup notes for reproducing: Windows x86-64, clang toolchain modules, runtime with ExpansionPak/RecompCore#18 applied (that PR is the delivery half of #23's fix -- without it the mtmsr exit in emitStateWrite creates the boundary but pending external interrupts still wait for slice granularity, and Colosseum's retrace wait starves back to ~0.25 fps).
1bec355("improve llvm backend") and0137523("Add native register ABI") incorporate the changes from #21, #22 and #23 -- thanks for folding those in. Measuring currentmainagainst the PR branches on the same runtime build and pinned savestates, though, shows a large performance regression:bench.sav, cappedCounters for the Colosseum runs show the same per-cycle hook-fallback rate on both builds, but guest throughput collapses ~12x on main (1.09G cycles retired vs 13.3G in an equal window), so the cost is in the generated code itself rather than in fallback traffic. The native ABI applies automatically per function via
nativeABIFlags()with no opt-out flag, so there is no way to A/B it from a built module -- an env or CLI gate would make this easy to bisect.Setup notes for reproducing: Windows x86-64, clang toolchain modules, runtime with ExpansionPak/RecompCore#18 applied (that PR is the delivery half of #23's fix -- without it the mtmsr exit in
emitStateWritecreates the boundary but pending external interrupts still wait for slice granularity, and Colosseum's retrace wait starves back to ~0.25 fps).