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

Issue 307333004: Optimize SelectorChecker's containsHTMLSpace() utility function (Closed)

Created:
6 years, 6 months ago by Inactive
Modified:
6 years, 6 months ago
Reviewers:
esprehn, eseidel
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, ojan
Visibility:
Public.

Description

Optimize SelectorChecker's containsHTMLSpace() utility function Avoid calling is8Bit() for every character in SelectorChecker's containsHTMLSpace() by doing the check once at the beginning and then call a templated containsHTMLSpaceTemplate() for the corresponding character type that will iterate over the raw string array. String::operator[] is not ideal here because: - It checks if the String's StringImpl is non-null - It does array bound checking - It calls is8Bit() to access the right raw string array The new implementation avoids doing these checks for every character in the string being checked. I see a 2.5% progression on cssquery-jquery's div[class~=dialog] subtest (7152.80 -> 7331.60 +/- 0.5%): http://dromaeo.com/?id=222400,222406 R=esprehn@chromium.org, eseidel@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175477

Patch Set 1 #

Patch Set 2 : Add LIKELY() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M Source/core/css/SelectorChecker.cpp View 1 1 chunk +11 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Inactive
6 years, 6 months ago (2014-06-03 19:18:11 UTC) #1
eseidel
lgtm Does this affect any perf test?
6 years, 6 months ago (2014-06-03 19:38:41 UTC) #2
Inactive
On 2014/06/03 19:38:41, eseidel wrote: > lgtm > > Does this affect any perf test? ...
6 years, 6 months ago (2014-06-03 20:35:26 UTC) #3
esprehn
On 2014/06/03 20:35:26, Chris Dumez wrote: > On 2014/06/03 19:38:41, eseidel wrote: > > lgtm ...
6 years, 6 months ago (2014-06-03 20:41:17 UTC) #4
Inactive
On 2014/06/03 20:41:17, esprehn wrote: > On 2014/06/03 20:35:26, Chris Dumez wrote: > > On ...
6 years, 6 months ago (2014-06-03 20:43:30 UTC) #5
Inactive
On 2014/06/03 20:43:30, Chris Dumez wrote: > On 2014/06/03 20:41:17, esprehn wrote: > > On ...
6 years, 6 months ago (2014-06-03 20:49:29 UTC) #6
esprehn
I'm not sure I understand, are you saying without the LIKELY there's no improvement?
6 years, 6 months ago (2014-06-03 20:55:24 UTC) #7
Inactive
On 2014/06/03 20:55:24, esprehn wrote: > I'm not sure I understand, are you saying without ...
6 years, 6 months ago (2014-06-03 20:58:33 UTC) #8
esprehn
lgtm
6 years, 6 months ago (2014-06-03 21:08:16 UTC) #9
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-06-03 22:06:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/307333004/20001
6 years, 6 months ago (2014-06-03 22:07:17 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu ...
6 years, 6 months ago (2014-06-03 22:22:55 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu ...
6 years, 6 months ago (2014-06-03 22:23:21 UTC) #13
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-06-04 12:23:10 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/307333004/20001
6 years, 6 months ago (2014-06-04 12:25:28 UTC) #15
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 13:00:13 UTC) #16
Message was sent while issue was closed.
Change committed as 175477

Powered by Google App Engine
This is Rietveld 408576698