Commit graph

7 commits

Author SHA1 Message Date
Matt Wismer
288143fadf Correct bloom hash bitpacking documentation
The two 12 bit keys add to 24 bits, which leaves 8 bits free in each word. (And 8 * 3 = 24, to pack in the fourth hash.)
2017-06-22 21:26:14 -04:00
Bobby Holley
71e76a054d Be smarter when clearing the bloom filter. 2017-06-21 19:53:16 -07:00
Bobby Holley
28c35ac9df Improve bloom microbenchmarks.
The current code is mostly bechmarking Rust's default hash routines for
integers, which is not interesting to us. We add generating function
that jumps around "enough" and also add benchmarks for clear().

It's hard to read too much into the numbers because we can't reliably
simulate L1/L2 cache behavior with cargo bench, but the results show
about 40ns for clear() about 2ns for insert, and about 1.5ns for
contains/remove. This informs our thinking in the next patch.
2017-06-21 19:53:15 -07:00
Bobby Holley
5b857686e2 Make selectors benchmark tests work again. 2017-06-21 19:53:15 -07:00
Bobby Holley
cf982d17b9 Shift by KEY_SIZE instead of something larger.
Currently all Gecko and Servo do the KEY_SHIFT thing, but there's no reason
we need to follow that here.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1371949#c10

MozReview-Commit-ID: CqNi7r9e5s0
2017-06-12 12:12:39 -07:00
Emilio Cobos Álvarez
65ebbb7c56
selectors: Unbust tests, and add a way to override the hash for the bloom filter. 2017-04-08 02:00:31 +02:00
Bobby Holley
8915e53cee Move rust-selectors in-tree. 2017-02-07 22:53:10 -08:00