DescriptionSimplify CSSSelector::isAttributeSelector() by not checking each Match type
Simplify CSSSelector::isAttributeSelector() by not checking each Match type
explicitly and reordering the Match enum instead so that the attribute
selector match type are contiguous and at the end of the enum. This way, the
check can become (m_match >= FirstAttributeSelectorMatch).
This optimization is similar to the one we already use in CollectionType.h
for collection types. isAttributeSelector() is called from
SelectorChecker::checkOne() which is hot code.
I see a ~2% progression on Dromaeo's cssquery-jquery:
http://dromaeo.com/?id=222514,222518
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175632
Patch Set 1 #
Total comments: 1
Patch Set 2 : Move value to enum #
Total comments: 2
Patch Set 3 : Move new value to end of enum #Messages
Total messages: 7 (0 generated)
|