Make source_order u32 and shrink Rule.

MozReview-Commit-ID: AKNTZZqke1O
This commit is contained in:
Bobby Holley 2017-06-10 10:49:08 -07:00
parent 6e3e7b282c
commit 3afab1400a
3 changed files with 7 additions and 7 deletions

View file

@ -45,7 +45,7 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec<Vec<Rule>>, SharedRwLock) {
let guard = shared_lock.read();
let rule = locked.read_with(&guard);
rule.selectors.0.iter().map(|s| {
Rule::new(s.selector.clone(), s.hashes.clone(), locked.clone(), i)
Rule::new(s.selector.clone(), s.hashes.clone(), locked.clone(), i as u32)
}).collect()
}).collect(), shared_lock)
}

View file

@ -27,7 +27,7 @@ fn size_of_selectors_dummy_types() {
// The size of this is critical to performance on the bloom-basic microbenchmark.
// When iterating over a large Rule array, we want to be able to fast-reject
// selectors (with the inline hashes) with as few cache misses as possible.
size_of_test!(test_size_of_rule, style::stylist::Rule, 40);
size_of_test!(test_size_of_rule, style::stylist::Rule, 32);
size_of_test!(test_size_of_option_arc_cv, Option<Arc<ComputedValues>>, 8);
size_of_test!(test_size_of_option_rule_node, Option<StrongRuleNode>, 8);