Skip to content

change: redesign zerompk::Write trait#2

Merged
nuskey8 merged 2 commits intomainfrom
redesign-write-trait
Mar 24, 2026
Merged

change: redesign zerompk::Write trait#2
nuskey8 merged 2 commits intomainfrom
redesign-write-trait

Conversation

@nuskey8
Copy link
Copy Markdown
Owner

@nuskey8 nuskey8 commented Mar 24, 2026

This PR redesigns the Write trait. While this is a breaking change, it's a low-level API, so the impact is not significant.

Changes

  • Remove write_byte()/write_bytes()
  • Remove all default implementations

Also, completely rewrite the three Write implementations (slice, Vec, std::io::Write) to significantly improve serialization performance.

Serialize/Deserialize Struct (with 4 fields, map format) 1000 times

Serialize
before 35.81 μs
after 18.76 μs

@nuskey8 nuskey8 merged commit 349807c into main Mar 24, 2026
@nuskey8 nuskey8 deleted the redesign-write-trait branch March 24, 2026 01:40
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