DescriptionOptimize StringImpl::lower() for 8-bit strings
The StringImpl::lower() method is used very intensively in blink, for example Intel Vtunes Amplifier profiler shows this method as a biggest hotspot by CPU usage viewpont when the 'AttributeDescendantSelector.html' CSS performance test is running.
This path optimizes cycles in StringImpl::lower() for 8-bit strings in order to avoid unneeded iterations and to re-use the already calculated data as much as possible.
After this patch is applied the 'AttributeDescendantSelector.html' performance test shows approx. 13% results improvement (linux desktop x64):
before
avg 561.7456430409343 runs/s
median 562.560813181673 runs/s
stdev 11.976426704572622 runs/s
min 529.8020262095021 runs/s
max 577.3626598774758 runs/s
after
avg 631.9779597646024 runs/s
median 636.3358333128829 runs/s
stdev 12.060471875689105 runs/s
min 602.4807143680587 runs/s
max 642.217924282401 runs/s
A unit test has been added to verify the method's behavior.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197102
Patch Set 1 #
Total comments: 3
Patch Set 2 : Updated according to review comments #Patch Set 3 : rebased #
Messages
Total messages: 13 (6 generated)
|