From f13ed246fd229249bcd5fcb06ab31d2c6a6a53d1 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 14 Apr 2017 21:17:06 +0800 Subject: [PATCH] Use the bloom filter for child selectors. This speeds up bloom-basic-ref.html by 4x on my machine. --- components/selectors/matching.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs index a0a2dc46aa0..206e98a77d6 100644 --- a/components/selectors/matching.rs +++ b/components/selectors/matching.rs @@ -122,6 +122,7 @@ fn may_match(mut selector: &ComplexSelector, loop { match selector.next { None => break, + Some((ref cs, Combinator::Child)) | Some((ref cs, Combinator::Descendant)) => selector = &**cs, Some((ref cs, _)) => { selector = &**cs;