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

Use hashbrown for std in addition to no_std builds #185

Closed
wants to merge 1 commit into from
Closed

Use hashbrown for std in addition to no_std builds #185

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 10, 2019

This simplifies dependency management a little bit and might also yield minimal performance improvements for large modules even though the included benchmarks do not have enough exports to make this measurable.

@parity-cla-bot
Copy link

It looks like @adam-rhebo hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@pepyakin pepyakin self-requested a review June 10, 2019 13:14
@ghost
Copy link
Author

ghost commented Jun 11, 2019

It looks like @adam-rhebo hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

[clabot:check]

@parity-cla-bot
Copy link

It looks like @adam-rhebo signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@pepyakin
Copy link
Collaborator

The thing is, we most likely want to use BTreeMap even for no_std builds for some use-cases (see #183).

@ghost
Copy link
Author

ghost commented Jun 11, 2019

The thing is, we most likely want to use BTreeMap even for no_std builds for some use-cases (see #183).

I see. Is BTreeMap usable with no_std out of the box? If so, shall I just retarget this to replace HashMap by BTreeMap?

@pepyakin
Copy link
Collaborator

I see. Is BTreeMap usable with no_std out of the box?

Well, it is available with alloc create, but this is the case for hashbrown as well.

If so, shall I just retarget this to replace HashMap by BTreeMap?

I think it depends on your use-case: we want to use BTreeMap for now because of it's worst-case performance.

@ghost
Copy link
Author

ghost commented Jun 11, 2019

I think it depends on your use-case: we want to use BTreeMap for now because of it's worst-case performance.

Personally, I am interested in an embedded use case where I expect fewer than 10 exports per module and hence BTreeMap is fine for me (the compactness of an open-addressed hash table would be nice, but it really won't matter for me).

This MR was really just motivated by simplifying the build system a tiny bit. Hence I'll retarget this to use alloc::collections::btree_map::BTreeMap...

@ghost
Copy link
Author

ghost commented Jun 11, 2019

Closing in favor of #187

@ghost ghost closed this Jun 11, 2019
@ghost ghost deleted the hashbrown-on-std branch June 11, 2019 14:32
This pull request was closed.
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.

2 participants