Skip to content

perf: speed up generated encode paths#34

Merged
shamaton merged 3 commits into
mainfrom
perf/encode
Jun 7, 2026
Merged

perf: speed up generated encode paths#34
shamaton merged 3 commits into
mainfrom
perf/encode

Conversation

@shamaton

@shamaton shamaton commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Optimize generated []byte and [N]byte encode paths by replacing per-byte loops with bulk copy.
  • Skip unnecessary errors.Is calls on successful generated public encode/decode paths.
  • Keep the existing public API unchanged.

Background / Motivation

Generated encode paths currently iterate over byte slices/arrays element by element even though MessagePack bin payloads can be copied contiguously. This adds avoidable overhead for byte-heavy payloads.

@github-actions github-actions Bot added the type: performance Performance improvements or optimizations label Jun 7, 2026
@shamaton shamaton merged commit 54f0707 into main Jun 7, 2026
34 checks passed
@shamaton shamaton deleted the perf/encode branch June 7, 2026 07:25
@github-actions github-actions Bot mentioned this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: performance Performance improvements or optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant