Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bincode 2.0 will include its own traits for encoding and decoding, which are more efficient than going via serde.
I opened bincode-org/bincode#612 to add implementations for smallvec, however the recommendation there is that these traits should be implemented in the smallvec crate instead. This PR adds a new feature
bincode2
, which, when enabled, adds implementations of the new bincode traits forSmallVec
.I see a roughly 10% improvement in my benchmarks when using the new bincode traits directly vs using serde, so this would be a useful feature to have.
Because there is already a dev-dependency on Bincode 1 used in tests, I've called this feature
bincode2
. That can be changed if you'd prefer the feature to be calledbincode
.