Skip to content

Write CBOR strings from compact Latin-1 storage - #1326

Merged
adwsingh merged 1 commit into
adwsingh/serde-perffrom
adwsingh/cbor-compact-string-access
Aug 14, 2026
Merged

Write CBOR strings from compact Latin-1 storage#1326
adwsingh merged 1 commit into
adwsingh/serde-perffrom
adwsingh/cbor-compact-string-access

Conversation

@adwsingh

@adwsingh adwsingh commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What behavior changes?

CBOR now reads compact strings from their Latin-1 backing array. ASCII is bulk-copied, while non-ASCII Latin-1 bytes are expanded directly to UTF-8.

Why is this change needed?

This avoids repeated charAt access and the deprecated string copy path used by the common CBOR case.

How was this validated?

Ran the CBOR tests with compact access enabled and forcibly disabled, plus Spotless checks.

What should reviewers focus on?

The ASCII copy path, Latin-1 expansion, and unchanged UTF-16 fallback.

Additional Links

Part of stack #1325.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@adwsingh
adwsingh force-pushed the adwsingh/cbor-compact-string-access branch from 8ffd880 to bb852bf Compare August 14, 2026 16:05
@adwsingh
adwsingh requested a review from mtdowling August 14, 2026 16:11
@adwsingh
adwsingh merged commit db06b58 into main Aug 14, 2026
5 of 7 checks passed
@adwsingh
adwsingh deleted the adwsingh/cbor-compact-string-access branch August 14, 2026 16:52
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