paritytech / paritytech/parity-scale-codec
Improve performance
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 287
- Forks
- 103
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
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 |
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced rust_serialization_benchmark results and the parity-scale-codec implementation, then compare the reported cases with speedy. The issue does not name repository files, tests, or a target improvement; completion would require identifying a concrete optimization and validating it against the referenced benchmarks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100