Skip to content

Reserve the full length when building an encoding - #184

Open
g4lb wants to merge 1 commit into
ia0:mainfrom
g4lb:reserve-encoding-capacity
Open

g4lb wants to merge 1 commit into
ia0:mainfrom
g4lb:reserve-encoding-capacity

Conversation

@g4lb

@g4lb g4lb commented Nov 23, 2026

Copy link
Copy Markdown

Specification::encoding() now reserves the full length once. The output does not change.

Specification::encoding() Before After Change
hex 217 ns 78.2 ns -63.9%
base64 170 ns 68 ns -59.9%
base64 with wrap and ignore 187 ns 86.5 ns -53.8%
base2 with translate 403 ns 240 ns -40.6%

Encode and decode did not change (criterion, Apple M5).

This branch has not been deployed

No deployments
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.

1 participant