Chromium Code Reviews
DescriptionConsistently cache ElementData::length() before loops
Consistently cache ElementData::length() before loops as this method is not
a simple getter (it contains a conditional branch) and we don't want to call
it for each iteration of the loop.
Previously, it was only cached before some of the loops. This CL makes this
consistent. Also, use length for the variable instead of len, as we prefer to
avoid abbreviations, as per coding style.
Same thing for Element::attributeCount() as it calls ElementData::length().
R=adamk, eseidel
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167794
Patch Set 1 #Patch Set 2 : Cache Element::attributeCount() as well #Patch Set 3 : Fix style errors #Patch Set 4 : Add comments #Patch Set 5 : Fix test failure #
Messages
Total messages: 21 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||