paritytech / paritytech/parity-scale-codec

Improve performance

Open
#341 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.