Keep AVM.executeTuples under the JIT huge-method limit - #563
Merged
bertysentry merged 1 commit intoAug 17, 2026
Merged
Conversation
HotSpot never JIT-compiles a method larger than HugeMethodLimit (8000 bytecodes); executeTuples sat at 7994 under javac and 8013 under ECJ, so depending on the compiler the interpreter loop was silently never compiled, making every AWK script ~4x slower with no warning. Extract the five fattest inline opcode blocks (INDIRECT_CALL and the four compound-assignment families) into private exec* helpers, following the existing helper convention. executeTuples drops to 6728 bytecodes under javac and 6767 under ECJ. Add AVMExecuteTuplesSizeTest, which parses AVM.class and fails the build if executeTuples exceeds 7500 bytecodes, turning this silent performance cliff into a loud build failure. Fixes #562 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
bertysentry
deleted the
562-performance-keep-avm-executetuples-under-the-jit-huge-method-limit
branch
August 17, 2026 12:20
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.
Fixes #562
Problem
HotSpot never JIT-compiles a method whose bytecode exceeds
HugeMethodLimit(8000, default-XX:+DontCompileHugeMethods).AVM.executeTuples— the interpreter dispatch loop — sat at 7994 bytecodes under javac and 8013 under ECJ. Any growth (or simply compiling with Eclipse JDT, as VS Code's Java extension does) crossed the cliff and made every AWK script ~4× slower, silently: no error, no JIT warmup, constant low throughput. This shipped once already via an ECJ-compiled local build (mandelbrot.awk: 40–50 fps → ~7 fps).Fix
exec*helpers (following the file's existing convention):INDIRECT_CALLand the four compound-assignment families (*_EQ,*_EQ_ARRAY,*_EQ_MAP_ELEMENT,*_EQ_INPUT_FIELD). Pure mechanical moves — bodies unchanged, earlybreaks becomereturns inexecIndirectCall.executeTuplesis now 6728 bytecodes (javac) / 6767 (ECJ) — >1200 of headroom under both compilers.AVMExecuteTuplesSizeTestparsesAVM.class(minimal dependency-free class-file reader) and fails the build ifexecuteTuplesexceeds 7500 bytecodes, converting the silent cliff into a loud build failure.Measurements
mandelbrot.awk -v profile=1, 100 frames, WSL2 / Temurin 25, output redirected:No user-visible behavior change, so no behavior-changes.md entry.
Verification
mvn clean verify: 769 unit tests pass (2 new), checkstyle/pmd/spotbugs clean, compatibility baseline unchanged.🤖 Generated with Claude Code