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

Issue 11428076: Inline hot ctor/dtors for struct-like gfx:: geometry types (Closed)

Created:
8 years ago by jamesr
Modified:
8 years ago
Reviewers:
danakj
CC:
chromium-reviews, cc-bugs_chromium.org, sky
Visibility:
Public.

Description

Inline hot ctor/dtors for struct-like gfx:: geometry types This inlines the ctors and (empty) dtors for gfx::PointF, SizeF and RectF. On a ToT chromium mac release build, inlining these is a 8.5% speedup on cc_perftests. Based on profiling data from instruments inlining QuadF would be a speedup as well, but the chromium-style plugin thinks it's too complex (even though the dtor has no code). BUG= NOTRY=true (yoda style) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170378

Patch Set 1 #

Patch Set 2 : also inline int size/point/rect #

Total comments: 3

Patch Set 3 : fix style issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -97 lines) Patch
M ui/gfx/point.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/point.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M ui/gfx/point_f.h View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/gfx/point_f.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M ui/gfx/rect.h View 1 2 2 chunks +17 lines, -6 lines 0 comments Download
M ui/gfx/rect.cc View 1 1 chunk +0 lines, -21 lines 0 comments Download
M ui/gfx/rect_f.h View 1 chunk +20 lines, -6 lines 0 comments Download
M ui/gfx/rect_f.cc View 1 chunk +0 lines, -21 lines 0 comments Download
M ui/gfx/size.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ui/gfx/size.cc View 1 2 chunks +0 lines, -9 lines 0 comments Download
M ui/gfx/size_f.h View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/gfx/size_f.cc View 1 chunk +0 lines, -9 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jamesr
Dana - please review sky - cc'ing as an FYI.
8 years ago (2012-11-29 10:03:27 UTC) #1
jamesr
Also inlining the int versions of size/point/rect (since they showed up next in the profile) ...
8 years ago (2012-11-29 10:24:45 UTC) #2
danakj
LGTM+nits Did you try moving cons/destructors from rect_base_impl.h to rect_base.h as well? Do you have ...
8 years ago (2012-11-29 18:36:44 UTC) #3
jamesr
https://codereview.chromium.org/11428076/diff/3002/ui/gfx/rect.h File ui/gfx/rect.h (right): https://codereview.chromium.org/11428076/diff/3002/ui/gfx/rect.h#newcode48 ui/gfx/rect.h:48: Size(width, height)) {} On 2012/11/29 18:36:44, danakj wrote: > ...
8 years ago (2012-11-29 22:40:40 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11428076/1013
8 years ago (2012-11-29 23:03:06 UTC) #5
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-11-29 23:53:48 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11428076/1013
8 years ago (2012-11-30 00:15:13 UTC) #7
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-11-30 00:26:08 UTC) #8
danakj
i'd NOTRY=true this
8 years ago (2012-11-30 01:04:50 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11428076/1013
8 years ago (2012-11-30 01:08:35 UTC) #10
commit-bot: I haz the power
8 years ago (2012-11-30 03:34:39 UTC) #11
Message was sent while issue was closed.
Change committed as 170378

Powered by Google App Engine
This is Rietveld 408576698