Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Issue 1181013008: Optimize StringImpl::lower() for 8-bit strings (Closed)

Created:
5 years, 6 months ago by Mikhail
Modified:
5 years, 6 months ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-wtf_chromium.org, Mike West, rune, Timothy Loh
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Optimize 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -21 lines) Patch
M Source/wtf/text/StringImpl.cpp View 1 1 chunk +18 lines, -21 lines 0 comments Download
M Source/wtf/text/WTFStringTest.cpp View 1 2 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
Mikhail
PTAL
5 years, 6 months ago (2015-06-12 13:29:48 UTC) #2
tkent
lgtm https://codereview.chromium.org/1181013008/diff/1/Source/wtf/text/StringImpl.cpp File Source/wtf/text/StringImpl.cpp (right): https://codereview.chromium.org/1181013008/diff/1/Source/wtf/text/StringImpl.cpp#newcode506 Source/wtf/text/StringImpl.cpp:506: unsigned needsLowering = m_length; The name |needsLowering| sounds ...
5 years, 6 months ago (2015-06-15 01:12:56 UTC) #3
Mikhail
On 2015/06/15 01:12:56, tkent wrote: > lgtm > > https://codereview.chromium.org/1181013008/diff/1/Source/wtf/text/StringImpl.cpp > File Source/wtf/text/StringImpl.cpp (right): > ...
5 years, 6 months ago (2015-06-15 07:49:13 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181013008/20001
5 years, 6 months ago (2015-06-15 07:49:45 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/47471)
5 years, 6 months ago (2015-06-15 07:52:00 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181013008/40001
5 years, 6 months ago (2015-06-15 08:28:21 UTC) #12
commit-bot: I haz the power
5 years, 6 months ago (2015-06-15 08:49:05 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197102

Powered by Google App Engine
This is Rietveld 408576698