Chromium Code Reviews
DescriptionAvoid calling lower() on inline styles in parseKeywordValue.
We were doing string.lower() on every inline style that was assigned
to a non-keyword property to compare the value to "inherit" and
"initial". This is wasteful and shows up in profiles, instead lets use
equalIgnoringASCIICase.
To do this we need to expand the overload set for
equalIgnoringASCIICase to include one that takes a const char* so that
we don't allocate a temporary String instance when passing a literal.
We also inline the call to strlen so that the compiler can figure out
the length for us and avoid calling strlen at runtime.
This reduces the script execution time of Animometer > Leaves by 1% on
my Macbook Pro.
BUG=606211
Committed: https://crrev.com/d56e7dd93c7a25a390ebda860dcd17a17533d5f8
Cr-Commit-Position: refs/heads/master@{#395809}
Patch Set 1 #
Total comments: 1
Messages
Total messages: 20 (8 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||