Skip to content

Use base64.Encode instead of EncodeToString in JWS marshal#1565

Merged
lestrrat merged 2 commits intodevelop/v3from
perf-base64-encode
Feb 22, 2026
Merged

Use base64.Encode instead of EncodeToString in JWS marshal#1565
lestrrat merged 2 commits intodevelop/v3from
perf-base64-encode

Conversation

@lestrrat
Copy link
Collaborator

Write []byte directly to buffer instead of converting to string.

MarshalFlattened: -20% mem (875→699 B/op), -17% allocs (12→10)
MarshalFull: -14% mem (1913→1639 B/op), -11% allocs (27→24)

Write []byte directly to buffer instead of converting to string.

MarshalFlattened: -20% mem (875→699 B/op), -17% allocs (12→10)
MarshalFull: -14% mem (1913→1639 B/op), -11% allocs (27→24)
@lestrrat lestrrat merged commit 934d63d into develop/v3 Feb 22, 2026
23 checks passed
@lestrrat lestrrat deleted the perf-base64-encode branch February 22, 2026 11:04
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