Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bincode #130

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

branchseer
Copy link
Contributor

@branchseer branchseer commented Feb 11, 2023

bincode is a compact format that doesn't store field names. When storing a Slab containing lots of entries with many fields and small values, the output from bincode can be significantly smaller compared to serde formats like JSON and CBOR.

Even though bincode already provides serde feature that works with all types implementing serde's traits, it has limitations, and comes with a roughly 20% performance decrease based on my local testing.

Remove unnecessary test

Update bincode version specifier

Adjust comments
Comment on lines 27 to +29
[dependencies]
serde = { version = "1.0.95", optional = true, default-features = false, features = ["alloc"] }
bincode = { version = "2.0.0-rc", optional = true, default-features = false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not going to add a release candidate as a dependency. Upgrading to the real 2.0.0 when it is released would be a breaking change.

@branchseer branchseer marked this pull request as draft February 11, 2023 19:00
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.

2 participants