mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Add a size_of test for Rule.
MozReview-Commit-ID: J9y9cl0rpxX
This commit is contained in:
parent
6fe0e30c16
commit
b815cabaf7
1 changed files with 5 additions and 0 deletions
|
@ -19,6 +19,11 @@ fn size_of_selectors_dummy_types() {
|
||||||
assert_eq!(align_of::<dummies::Atom>(), align_of::<style::Atom>());
|
assert_eq!(align_of::<dummies::Atom>(), align_of::<style::Atom>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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, 64);
|
||||||
|
|
||||||
size_of_test!(test_size_of_property_declaration, style::properties::PropertyDeclaration, 32);
|
size_of_test!(test_size_of_property_declaration, style::properties::PropertyDeclaration, 32);
|
||||||
|
|
||||||
// This is huge, but we allocate it on the stack and then never move it,
|
// This is huge, but we allocate it on the stack and then never move it,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue