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

Issue 2438353002: Avoid copying value in ComputedStyle CoW comparions (compareEqual) (Closed)

Created:
4 years, 2 months ago by fs
Modified:
4 years, 2 months ago
Reviewers:
pdr., esprehn
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid copying value in ComputedStyle CoW comparions (compareEqual) Because of the cast of the RHS, |u|, a copy would be generated, with code and cycle bloat as the result. In some cases this can even have prevented inlining. Particularly nasty examples: bool compareEqual(const Vector<LengthPoint>&, const Vector<LengthPoint>&) [210 bytes] bool compareEqual(const Vector<CSSPropertyID>&, const Vector<CSSPropertyID>&) [274 bytes] bool compareEqual(const Vector<GridTrackSize>&, const Vector<GridTrackSize>&) [182 bytes] bool compareEqual(const HashMap<String, GridArea>&, const HashMap<String, GridArea>&) [308 bytes] bool compareEqual(const TransformOperations&, const TransformOperations&) [441 bytes] bool compareEqual(const LengthBox&, const LengthBox&) [249 bytes] Remove the U->T cast in compareEqual to avoid the copies. Nothing seems to require this coercion (anymore?) This eliminates the above symbols entirely. A total binary size reduction of >30k (x86-64; non-official) also indicates even the simpler cases/types may have benefited. Committed: https://crrev.com/12052640ac64720e5d634cd7831eb9c3ca749763 Cr-Commit-Position: refs/heads/master@{#426990}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
fs
4 years, 2 months ago (2016-10-21 20:05:50 UTC) #4
esprehn
lgtm, in what cases do we need the cast though? I'm not sure I understand ...
4 years, 2 months ago (2016-10-21 21:50:19 UTC) #7
fs
On 2016/10/21 at 21:50:19, esprehn wrote: > lgtm, in what cases do we need the ...
4 years, 2 months ago (2016-10-22 09:57:25 UTC) #11
fs
On 2016/10/22 at 09:57:25, fs wrote: > On 2016/10/21 at 21:50:19, esprehn wrote: > > ...
4 years, 2 months ago (2016-10-22 10:46:04 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2438353002/1
4 years, 2 months ago (2016-10-22 10:47:19 UTC) #17
fs
On 2016/10/22 at 10:46:04, fs wrote: > On 2016/10/22 at 09:57:25, fs wrote: > > ...
4 years, 2 months ago (2016-10-22 10:50:00 UTC) #18
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-22 10:56:03 UTC) #19
commit-bot: I haz the power
4 years, 2 months ago (2016-10-22 10:58:34 UTC) #21
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/12052640ac64720e5d634cd7831eb9c3ca749763
Cr-Commit-Position: refs/heads/master@{#426990}

Powered by Google App Engine
This is Rietveld 408576698