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

Issue 1167383004: Optimize MutableStylePropertySet::findPropertyIndex (Closed)

Created:
4 years, 10 months ago by Mikhail
Modified:
4 years, 10 months ago
Reviewers:
Timothy Loh, Mike West, rune
CC:
blink-reviews, blink-reviews-style_chromium.org, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Optimize MutableStylePropertySet::findPropertyIndex The Intel Vtune Amplifier showed 'MutableStylePropertySet::findPropertyIndex' as one of the biggest hotspot by CPU usage viewpoint for CSS performance tests. This patch makes it more efficient by using std::find_if instead of previously used linear search, the test results improved as following: 1) CSSPropertySetterGetterMethods.html - approx. 11% better before avg 8209.627773541746 runs/s median 8219.159152799137 runs/s stdev 95.69280121453318 runs/s min 7950.488333886082 runs/s max 8334.299157035108 runs/s after avg 9095.94802572367 runs/s median 9098.099366883693 runs/s stdev 60.291500266466144 runs/s min 8946.226065032974 runs/s max 9180.054245827989 runs/s 2) CSSPropertyUpdateValue.html - approx. 4% better before: avg 14598.817565565343 runs/s median 14620.181782154228 runs/s stdev 75.59180598169823 runs/s min 14406.699115207599 runs/s max 14688.987467305702 runs/s after: avg 15207.605281115579 runs/s median 15217.061385777779 runs/s stdev 190.52047714899481 runs/s min 14810.510319831952 runs/s max 15447.612680018468 runs/s Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196923

Patch Set 1 #

Patch Set 2 : Fix debug build #

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

Messages

Total messages: 12 (4 generated)
Mikhail
PTAL
4 years, 10 months ago (2015-06-10 11:45:43 UTC) #2
rune
Do you have more insight into why find_if makes it faster?
4 years, 10 months ago (2015-06-11 07:26:50 UTC) #4
Mike West
On 2015/06/11 at 07:26:50, rune wrote: > Do you have more insight into why find_if ...
4 years, 10 months ago (2015-06-11 07:46:17 UTC) #5
Mikhail
On 2015/06/11 07:26:50, rune wrote: > Do you have more insight into why find_if makes ...
4 years, 10 months ago (2015-06-11 07:48:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1167383004/20001
4 years, 10 months ago (2015-06-11 07:57:38 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196923
4 years, 10 months ago (2015-06-11 08:02:56 UTC) #9
Timothy Loh
Why don't we just use a lambda?
4 years, 10 months ago (2015-06-11 08:31:42 UTC) #11
Mikhail
4 years, 10 months ago (2015-06-11 09:32:59 UTC) #12
Message was sent while issue was closed.
On 2015/06/11 08:31:42, Timothy Loh wrote:
> Why don't we just use a lambda?

thanks! lamba would be better indeed

Powered by Google App Engine
This is Rietveld 408576698