Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Avoid allocations when computing triehash. #8176

Merged
merged 2 commits into from
Mar 22, 2018
Merged

Avoid allocations when computing triehash. #8176

merged 2 commits into from
Mar 22, 2018

Conversation

tomusdrw
Copy link
Collaborator

@tomusdrw tomusdrw commented Mar 21, 2018

Analyzed size of the vectors before doing the change. as_nibbles is used for indices and the sizes are only 2 (mostly),4,6. hex is always half of it.

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Mar 21, 2018
@5chdn 5chdn added this to the 1.11 milestone Mar 21, 2018
@debris
Copy link
Collaborator

debris commented Mar 22, 2018

have you benched that? :D

@debris debris added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 22, 2018
@5chdn 5chdn merged commit 7c8d404 into master Mar 22, 2018
@5chdn 5chdn deleted the td-as-nibbles branch March 22, 2018 08:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants