Skip to content

Replace make+copy with bytes.Clone#1564

Merged
lestrrat merged 1 commit intodevelop/v3from
perf-bytes-clone
Feb 22, 2026
Merged

Replace make+copy with bytes.Clone#1564
lestrrat merged 1 commit intodevelop/v3from
perf-bytes-clone

Conversation

@lestrrat
Copy link
Collaborator

Idiomatic single-call replacement for the two-line make([]byte, buf.Len()) + copy pattern.
No performance change; readability improvement.

Idiomatic single-call replacement for the two-line
make([]byte, buf.Len()) + copy pattern.
No performance change; readability improvement.
@lestrrat lestrrat merged commit 0c09d87 into develop/v3 Feb 22, 2026
24 checks passed
@lestrrat lestrrat deleted the perf-bytes-clone 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