Repository navigation
Pin decimal fast-path boundaries and reuse token characters - #1369
Merged
Merged
Conversation
Contributor
Author
|
Independent review of Verified
Findings (all low severity)
🤖 Generated with Claude Code |
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.
The decimal parser's short-token limits and shortest-spelling comparison lacked checked-in regression coverage, and YAML could build the same numeric character array twice during one classification.
Reuse the character buffer locally within the token's precision decision, retaining lazy access for longer tokens. Add boundary tests, a fixed-seed 4,096-token classification oracle for JSON/YAML through both public mapper factories and NodeReader, upper-bound checks on classification getter requests (measured before Jackson tree binding), and nextNameMatch cache-invalidation coverage. Pin Jackson 3 YAML Core Schema's implicit string handling separately from explicit !!float numeric spellings. A short negative-token case pins retention of the leading-minus shortcut. Tag the new suite with
jackson-upgrade. Character reuse is allocation hygiene; YAML timings reported in review on master were within noise, so no measured speedup is claimed.Clarify that the existing performance table is historical output from a separate best-of-eight harness (JSON 200,000 elements, YAML 20,000), while the checked-in JMH benchmark defaults to 20,000 elements for both formats and uses a different measurement protocol.
Validation with Jackson 3.2.3:
mvn --batch-mode -Dstyle.color=never clean verifypassed on Corretto 17.0.13, 21.0.5, and 25.0.3. Each run reported 10,568 tests, 30 skipped, zero failures/errors. All 11 new cases passed.Addresses #1368 on master; the companion 2.x PR #1370 provides the other supported Jackson line. Machine-double performance remains tracked in #1362. Remote CI passed for Java 17/21/25 and submit-maven.