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

Improve performance #341

Open
koute opened this issue May 24, 2022 · 0 comments
Open

Improve performance #341

koute opened this issue May 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@koute
Copy link
Contributor

koute commented May 24, 2022

This isn't very high priority as serialization/deserialization isn't really a bottleneck in Substrate AFAIK, although the current implementation leaves some performance on the table.

For reference, I've hooked up parity-scale-codec to the rust_serialization_benchmark benchmarks and here are the results compared to speedy which is my personal serialialization/deserialization crate that I've optimized for speed and with almost exactly the same serialization format as parity-scale-codec (it doesn't special-case Option<bool> and has a different varint format, but the rest should serialize the same, sans defaults). Here are the results on my machine:

benchmark parity-scale-codec speedy
log/serialize 552.15us 157.79us
log/deserialize 3.05ms 1.74ms
mesh/serialize 3.69ms 400.30us
mesh/deserialize 10.45ms 489.41us
minecraft_savedata/serialize 534.54us 224.66us
minecraft_savedata/deserialize 2.56ms 1.40ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant