Closed Bug 1484096 Opened 7 years ago Closed 7 years ago

Remove use of `fnv` in bloom.rs

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

To support that, this patch also does the following. - Removes the insert(), remove() and might_contain() methods, because they are specialized versions of insert_hash(), remove_hash(), and might_contain_hash(), and they are only used by tests within this file. - Moves hash() from the top level into create_and_insert_some_stuff(). - Changes create_and_insert_some_stuff() so that instead of hashing consecutive integers, it instead hashes stringified consecutive integers, which matches real usage a little better. - Raises the false_positives limit a little to account for the above changes.
Comment on attachment 9001815 [details] [diff] [review] Remove use of `fnv` in bloom.rs Review of attachment 9001815 [details] [diff] [review]: ----------------------------------------------------------------- Should we also remove the tests of fnv in xpcom/rust/gtest/bench-collections/? ::: servo/components/selectors/bloom.rs @@ +112,5 @@ > self.storage.adjust_first_slot(hash, true); > self.storage.adjust_second_slot(hash, true); > } > > + /// Removes all items with the particular hash from the bloom filter. Is "all items" correct here? This function will decrement the counter for the given hash.
Attachment #9001815 - Flags: review?(cam) → review+
> Should we also remove the tests of fnv in > xpcom/rust/gtest/bench-collections/? I'm inclined to leave it, because it's a widely-used hashing function, and it's good to have measurements of fxhash against it.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: