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

bytewords: use static allocated hash map #153

Conversation

jeandudey
Copy link
Contributor

The hash map is generated at compile time, this is to not allocate at runtime the HashMap as I'm going to make some PRs to make this crate no_std friendly :D.

It's another dependency but reduces one.

@jeandudey jeandudey temporarily deployed to default December 10, 2022 16:58 — with GitHub Actions Inactive
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2022

Codecov Report

Merging #153 (e8cd00e) into master (00dd637) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
- Coverage   92.32%   92.29%   -0.04%     
==========================================
  Files           6        5       -1     
  Lines         717      714       -3     
==========================================
- Hits          662      659       -3     
  Misses         55       55              
Impacted Files Coverage Δ
src/bytewords.rs 93.24% <ø> (-0.10%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jeandudey jeandudey force-pushed the jeandudey/use-static-allocated-hashmap branch from 8feb133 to a1c954c Compare December 10, 2022 17:05
@jeandudey jeandudey temporarily deployed to default December 10, 2022 17:16 — with GitHub Actions Inactive
@dspicher
Copy link
Owner

Hey @jeandudey , thanks for the PR!

I would very much welcome no_std support, looking forward to the contribution! 👍

Interestingly, once_cell has just merged a no_std mode, but it looks a bit more involved. Creating the map at compile time seems like the nicer way to go.

Could you please rebase the PR? Then I'll merge it.

The hash map is generated at compile time, this is to not allocate at
runtime the HashMap as I'm going to make some PRs to make this crate
no_std friendly.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
@jeandudey jeandudey force-pushed the jeandudey/use-static-allocated-hashmap branch from a1c954c to e8cd00e Compare December 11, 2022 12:09
@jeandudey jeandudey temporarily deployed to default December 11, 2022 12:09 — with GitHub Actions Inactive
@jeandudey
Copy link
Contributor Author

I would very much welcome no_std support, looking forward to the contribution! +1

Thanks!


I've rebased the PR

@dspicher dspicher merged commit 84f8bd6 into dspicher:master Dec 11, 2022
@jeandudey jeandudey deleted the jeandudey/use-static-allocated-hashmap branch December 12, 2022 17:47
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.

None yet

3 participants