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

Optimize prefix_proof by reducing the number of iterations #363

Merged
merged 5 commits into from
Mar 29, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Mar 28, 2023

cc #351

@github-actions
Copy link

github-actions bot commented Mar 28, 2023

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       -1353 ┊ alloc::slice::merge_sort::h419549773d9f3902
        +714 ┊ smoldot::trie::prefix_proof::PrefixScan::resume::h8c4c7b1729d58659
        +620 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h093532650fc1509c
        -620 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h4f899e96ba7b60d4
        +523 ┊ smoldot::trie::proof_decode::DecodedTrieProof<T>::children_from_key::h592c139d7b1c5a77
        +495 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h1bd8c062df03b630
        +495 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h2e994c18236b7475
        -495 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h5a16279a7101c26f
        -495 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h69807c3b232f99a1
        -486 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h3d4641880a4ed2f6
        +486 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h51ab3f07d8899627
        +461 ┊ smoldot::trie::proof_decode::DecodedTrieProof<T>::children_from_key::h35940ce888e913f6
        +438 ┊ smoldot::trie::proof_decode::DecodedTrieProof<T>::children_from_key::heb071a43d22e9cc0
        +435 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h5e9ec52f35cae481
        -435 ┊ <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold::h67bf0189dd0de171
        -349 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h097266e1e57acf14
        +346 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h4c43485ec6f6e1dd
        -306 ┊ alloc::slice::merge::he2d896d72f357fc6
        +274 ┊ smoldot::network::service::requests_responses::<impl smoldot::network::service::ChainNetwork<TNow>>::start_storage_proof_request::h95ddab53f931a453
        -274 ┊ smoldot::network::service::requests_responses::<impl smoldot::network::service::ChainNetwork<TNow>>::start_storage_proof_request::hcd94cb3779db4290
        +601 ┊ ... and 107 more.
       +2256 ┊ Σ [127 Total Rows]

@tomaka tomaka marked this pull request as ready for review March 28, 2023 17:44
@tomaka tomaka added this pull request to the merge queue Mar 29, 2023
Merged via the queue into smol-dot:main with commit 29c6ccc Mar 29, 2023
@tomaka tomaka deleted the optimize-prefix-proof branch March 29, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant