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

consider using a different hash than SipHash for integer keys in rustc #10586

Closed
thestinger opened this issue Nov 21, 2013 · 4 comments
Closed
Labels
I-compiletime Issue: Problems and improvements with respect to compile times.

Comments

@thestinger
Copy link
Contributor

You'll always be able to craft inputs for rustc making it hit a pathological compile-time and I don't think we need to protect against this. SipHash is pretty fast for strings, but on short fixed-size key types it's very slow. The compiler depends heavily on the speed of looking up integer keys in maps, so this is a huge performance cost.

(I'll post benchmark numbers soon)

@thestinger
Copy link
Contributor Author

A fast block cipher would also work here, but most are probably even slower than SipHash and are likely all going to be slower than just a multiplication...

@huonw
Copy link
Member

huonw commented Mar 4, 2014

cc #11783

@erickt
Copy link
Contributor

erickt commented Mar 11, 2014

nominating for closure since @alexcrichton's FNV hasher landed in #12635.

@alexcrichton
Copy link
Member

This has indeed be done now, hurray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-compiletime Issue: Problems and improvements with respect to compile times.
Projects
None yet
Development

No branches or pull requests

4 participants