Bobby Holley
c99bcdd4b8
Run rustfmt on selectors, servo_arc, and style.
...
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Simon Sapin
c496aa16a0
Rename the 'unstable' feature of the selectors crate to 'bench'
2017-10-12 17:19:02 +02:00
Cameron McCormack
b23f947d77
selectors: Add a simple Debug impl for CountingBloomFilter.
2017-08-09 19:27:49 +08:00
Cameron McCormack
df2c8b2902
selectors: Add a non-counting Bloom filter type.
2017-08-09 19:27:48 +08:00
Cameron McCormack
e294372a32
selectors: Genericize BloomFilter so we can easily define a non-counting version.
2017-08-09 19:27:47 +08:00
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