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

Support more integer types #61

Closed
jakoschiko opened this issue Aug 16, 2024 · 0 comments · Fixed by #69
Closed

Support more integer types #61

jakoschiko opened this issue Aug 16, 2024 · 0 comments · Fixed by #69

Comments

@jakoschiko
Copy link
Contributor

jakoschiko commented Aug 16, 2024

Mostly ran out of motivation. And back when I started writing this project const compilation weren't ready yet. Changing the constant used during hashing should be enough to support different int types.
I thought about being able to select growth algo. Now IntMap use power of two which is quite easy and fast but can be wasteful. Most other hashmaps use increase in switch statement with fixed primes. This might be possible to do the same way as the std hashmap injects hashers.
The biggest downside I see is increased complexity. IntMap is pretty readable right now. The more you introduce generics and type level programming the more complicated it becomes. The standard hashmap can be a bit tricky to read.

Originally posted by @JesperAxelsson in #56 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant