diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-02-15 00:55:46 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-02-15 00:55:46 -0500 |
| commit | 1e809aad3a187a284fc2c8f79dceda891deafc8a (patch) | |
| tree | 3902ed7d3c6718dc3d2659ca88107a055cea4ca5 | |
| parent | 5a9da65dc9b3225e0278faedba71eb8b5cfb237d (diff) | |
| download | rust-1e809aad3a187a284fc2c8f79dceda891deafc8a.tar.gz rust-1e809aad3a187a284fc2c8f79dceda891deafc8a.zip | |
rm FIXME from LinearMap's to_bucket
There are no more poor hash functions left in the codebase, and it makes sense to rely on there being a good hash function thanks to the inclusion of SipHash and the ease of using it with custom types. Closes #3041
| -rw-r--r-- | src/libcore/hashmap.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcore/hashmap.rs b/src/libcore/hashmap.rs index 9ec91d38515..8d4a1345146 100644 --- a/src/libcore/hashmap.rs +++ b/src/libcore/hashmap.rs @@ -76,10 +76,8 @@ pub mod linear { priv impl<K: Hash IterBytes Eq, V> LinearMap<K, V> { #[inline(always)] pure fn to_bucket(&self, h: uint) -> uint { - // FIXME(#3041) borrow a more sophisticated technique here from - // Gecko, for example borrowing from Knuth, as Eich so - // colorfully argues for here: - // https://bugzilla.mozilla.org/show_bug.cgi?id=743107#c22 + // A good hash function with entropy spread over all of the + // bits is assumed. SipHash is more than good enough. h % self.buckets.len() } |
