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

Issue 1261953005: Revert of Avoid argument copying in WTF hash-based containers (Closed)

Created:
5 years, 4 months ago by johnme
Modified:
5 years, 4 months ago
Reviewers:
tkent, Erik Corry, Nico, Mikhail
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

Revert of Avoid argument copying in WTF hash-based containers (patchset #7 id:120001 of https://codereview.chromium.org/1176303008/) Reason for revert: This broke HashMapTest.LookupNoKeyCopies on WebKit Win7 (dbg) and WebKit Win Oilpan (dbg): http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=HashMapTest.LookupNoKeyCopies&testType=wtf_unittests Original issue's description: > Avoid argument copying in WTF hash-based containers > > The 'KeyPeekInType' used by WTF hash-based containers is declared as 'const T&' for most of the classes, the const reference however was lost in the previous implemntation of HashTable 'contains(KeyPeekInType)' and 'find(KeyPeekInType)' methods as it was deduced to 'T' in the further sub-calls (i.e. template<typename HashTranslator, typename T> ValueType* lookup(T)). This led to unneeded argument copying (2 times per each contains/find call!) and it significantly affected the performance for containers having String or AtomicString key types, such containers are widely used for example in Blink core/css code. > > Below is the improvement of some randomly taken CSS performance tests results after the patch is applied (Linux desktop x64): > StyleSheetInsert.html - 3.4% > before: > avg 45.81039999999348 ms > median 45.569000000000415 ms > stdev 1.1590581657568524 ms > min 44.60299999993822 ms > max 48.70600000003833 ms > > after: > avg 44.08615000000964 ms > median 44.036000000005515 ms > stdev 0.5594090185250097 ms > min 43.43600000004244 ms > max 45.64000000004853 ms > > AttributeDescendantSelector.html - 7% > before: > avg 630.7230679370987 runs/s > median 631.5237186271941 runs/s > stdev 1.8378708385437512 runs/s > min 627.7266878002865 runs/s > max 632.970649942742 runs/s > > after: > avg 676.0284840644981 runs/s > median 675.6238838914546 runs/s > stdev 2.1139085234317543 runs/s > min 673.3117355645138 runs/s > max 678.8715588063761 runs/s > > CSSPropertyUpdateValue.html - 1.7% > before: > avg 16820.037469368264 runs/s > median 16812.805624173976 runs/s > stdev 70.629520115344 runs/s > min 16647.24488097132 runs/s > max 16989.1959332111 runs/s > > after: > avg 17089.45990524665 runs/s > median 17093.550656512787 runs/s > stdev 54.79615592821426 runs/s > min 16962.157162336156 runs/s > max 17179.8873301988 runs/s > > This patch also reduces content_shell binary size by 52KB. > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199826 TBR=tkent@chromium.org,erik.corry@gmail.com,thakis@chromium.org,mikhail.pozdnyakov@intel.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199839

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -75 lines) Patch
M Source/wtf/HashMapTest.cpp View 1 chunk +0 lines, -56 lines 0 comments Download
M Source/wtf/HashTable.h View 4 chunks +11 lines, -19 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
johnme
Created Revert of Avoid argument copying in WTF hash-based containers
5 years, 4 months ago (2015-07-31 15:21:05 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1261953005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1261953005/1
5 years, 4 months ago (2015-07-31 15:21:12 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=199839
5 years, 4 months ago (2015-07-31 15:22:07 UTC) #3
tkent
5 years, 4 months ago (2015-08-02 23:20:17 UTC) #4
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698