Store the bloom filter in TLS and reuse it across traversals.

MozReview-Commit-ID: EbzDehr2Y2L
This commit is contained in:
Bobby Holley 2017-05-26 14:56:26 +02:00
parent d1c31f7eaf
commit 0614010552
2 changed files with 32 additions and 4 deletions

View file

@ -31,6 +31,7 @@ use heapsize::HeapSizeOf;
use nodrop::NoDrop;
#[cfg(feature = "servo")]
use serde::{Deserialize, Serialize};
use stable_deref_trait::{CloneStableDeref, StableDeref};
use std::{isize, usize};
use std::borrow;
use std::cmp::Ordering;
@ -433,6 +434,9 @@ impl<T: ?Sized> AsRef<T> for Arc<T> {
}
}
unsafe impl<T: ?Sized> StableDeref for Arc<T> {}
unsafe impl<T: ?Sized> CloneStableDeref for Arc<T> {}
// This is what the HeapSize crate does for regular arc, but is questionably
// sound. See https://github.com/servo/heapsize/issues/37
#[cfg(feature = "servo")]