Skip to content

TOML: compact integer underscores without a second char array - #13

Merged
pjfanning merged 1 commit into
pjfanning:perf-issuesfrom
skrcode:jaipilot/pr-1-T21cVEEdAgrc
Aug 23, 2026
Merged

TOML: compact integer underscores without a second char array#13
pjfanning merged 1 commit into
pjfanning:perf-issuesfrom
skrcode:jaipilot/pr-1-T21cVEEdAgrc

Conversation

@skrcode

@skrcode skrcode commented Aug 23, 2026

Copy link
Copy Markdown

This is a one-commit JAIPilot Cloud follow-up on the exact current head of FasterXML/jackson-dataformats-text#713. It targets the original contributor branch so the change can be accepted without a duplicate upstream feature PR.

Change

Compact underscores in place in TomlParser.parseInt using the parser-owned token buffer. Characters before the first underscore are already in place, so the slow path no longer allocates and fills a second char array.

Proof

  • Exact parent: 6ce8d82, the current Misc perf fixes (toml, yaml) FasterXML/jackson-dataformats-text#713 head.
  • The same 113 focused TOML parser tests passed before and after, including decimal, hex, octal, binary, long-boundary, buffer-growth, and following-token cases.
  • Five fixed 1,000-call allocation batches on a 10,000-digit underscored integer: median allocated bytes per parse fell from 551,104 to 524,416, exactly one char array removed.
  • Full ./mvnw clean verify passed 1,558 tests with zero failures or errors.

Boundary and disclosure

Only the underscore-bearing slow path changes; integer tokens without underscores are untouched. The allocation fixture forces a very long token and is not a production-throughput claim.

JAIPilot Cloud generated and validated the patch in skrcode/jackson-dataformats-text#2. I reviewed the exact ancestry, complete two-file diff, verification evidence, and limitation before offering it here.

@pjfanning
pjfanning merged commit 473c038 into pjfanning:perf-issues Aug 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants