Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(76)

Issue 1152163005: Speed up case folding for 8-bit strings (Closed)

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

Description

Speed up case folding for 8-bit strings From http://trac.webkit.org/changeset/160954 by Anders Carlsson <andersca@apple.com>; "Add a case folding lookup table for 8-bit strings and use it instead of calling down to u_foldCase. On a simple microbenchmark using a lookup table is about 15x faster." The Intel Vtune Amplifier profiler showed 'ucase_fold()' calls among the top hotspots by CPU usage when profile the 'modify-element-classname.html' performance test and these calls were from 'WTF::equalIgnoringCase(const LChar* a, const LChar* b, unsigned length)'. This patch optimizes 'WTF::equalIgnoringCase()' so that the test's median time value falls approximately by 12% and the profiler shows the following delta of the total CPU time for the whole test execution: 3.550s - 3.145s = 0.405s Considering that 'WTF::equalIgnoringCase()' is a generic function and it is used very intensively in many places we can anticipate significant performance improvements for other scenarios as well. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196478

Patch Set 1 #

Patch Set 2 : Added a unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -4 lines) Patch
M Source/wtf/text/StringHash.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/wtf/text/StringImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/wtf/text/StringImpl.cpp View 2 chunks +22 lines, -4 lines 0 comments Download
M Source/wtf/text/StringImplTest.cpp View 1 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Mikhail
PTAL
4 years, 11 months ago (2015-06-03 13:21:15 UTC) #3
tkent
Please add a unit test to verify that the fast path and the slow path ...
4 years, 11 months ago (2015-06-04 02:05:20 UTC) #4
Mikhail
On 2015/06/04 02:05:20, tkent wrote: > Please add a unit test to verify that the ...
4 years, 11 months ago (2015-06-04 06:56:31 UTC) #5
tkent
lgtm
4 years, 11 months ago (2015-06-04 06:58:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1152163005/20001
4 years, 11 months ago (2015-06-04 06:59:02 UTC) #8
commit-bot: I haz the power
4 years, 11 months ago (2015-06-04 08:06:11 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=196478

Powered by Google App Engine
This is Rietveld 408576698