8000 bip158: Replace usage of HashSet with BTreeSet by tcharding · Pull Request #1576 · rust-bitcoin/rust-bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bip158: Replace usage of HashSet with BTreeSet #1576

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

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

tcharding
Copy link
Member

The bip158 module uses a HashSet and in order to do so requires the hashbrown dependency for "no-std" builds.

We can replace the usage of HashSet with a BTreeSet in bip158 and remove the hashbrown dependency entirely.

This patch makes no claims about performance cost or benefit of this change. The patch also makes no claims about the validity of the current HashSet usage.

The hashbrown dependency and HashSet usage can be trivially added back in if someone comes up with perf data to back it up.

Copy link
Collaborator
@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove it from Cargo.toml :)

@Kixunil
Copy link
Collaborator
Kixunil commented Jan 22, 2023

And yes, I like removing it without claiming anything about perf and re-adding if perf is affected and we can't resolve it without adding the dep.

The `bip158` module uses a `HashSet` and in order to do so requires the
`hashbrown` dependency for "no-std" builds.

We can replace the usage of `HashSet` with a `BTreeSet` in `bip158` and
remove the `hashbrown` dependency entirely.

This patch makes no claims about performance cost or benefit of this
change. The patch also makes no claims about the validity of the current
`HashSet` usage.

The `hashbrown` dependency and `HashSet` usage can be trivially added
back in if someone comes up with perf data to back it up.
@tcharding
Copy link
Member Author

Also remove it from Cargo.toml :)

Face palm, done.

Copy link
Collaborator
@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6e56fee

Copy link
Member
@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6e56fee

@apoelstra apoelstra merged commit 4702708 into rust-bitcoin:master Jan 23, 2023
@tcharding tcharding deleted the 01-22-rm-hashbrown branch January 23, 2023 22: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.

3 participants
0