Repository navigation
Build method descriptor boundaries directly in an array - #157
Merged
Merged
Conversation
bric3
approved these changes
Oct 29, 2026
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.
What Does This Do
Build method descriptor boundaries directly in an
int[], replacing the temporaryBitSetand its flattening pass inMethodOutline.parseBoundaries().Motivation
The current BitSet grows according to descriptor offsets, then copies those offsets into the array retained by the method outline. Direct array construction avoids that intermediate storage and conversion. Capacity follows parameter count rather than the length of class names in the descriptor.
Fresh measurements of this parser-only change against
main, using the existing Spring Web 7.0.9 corpus (1,325 classes / 9,633 methods):946470c)3c958d3)946470c)3c958d3)First-use boundary parsing averages 31.47% less time and 24.52% less allocation. Outlining followed by parsing every method's boundaries averages 3.05% less time and 4.93% less allocation. Both workloads save 188,752 bytes per corpus pass. The timings describe this corpus and JVM; some confidence intervals overlap.
Additional Notes
Measurement setup
-Xms512m -Xmx512m; GC profiler.Individual timings with JMH's reported 99.9% confidence intervals (µs/corpus pass):
946470c)3c958d3)946470c)3c958d3)Validation
Contributor Checklist
Jira ticket: not provided.