-
Notifications
You must be signed in to change notification settings - Fork 29
Optimise SSZ encoding and decoding #55
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55 +/- ##
==========================================
+ Coverage 58.92% 59.09% +0.16%
==========================================
Files 8 9 +1
Lines 297 330 +33
==========================================
+ Hits 175 195 +20
- Misses 122 135 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Unfortunately yes the Miri flags it as UB and the test also fails (we decode integers like 2 "successfully" as bools) |
|
Gonna try using |
|
Ok nice, we didn't actually need an |
|
Updated the benchmark results in the OP, there are some slower benches for encoding, but I think this is just noise. We haven't changed the encoding codepath at all. |
Summary of changes
unsafefast path for decoding lists and vectors ofu8chunks_exactand an explicit loop instead oftry_fold.Benchmarks
Additional Info
Depends on a new release of
ethereum_sszfor:Encoding is not meaningfully faster, but would need to be optimised in
sszitself (we need to optimise theVecimpl).