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

Issue 2841343002: Remove padding in v8::internal::compiler::Constant class (Closed)

Created:
3 years, 8 months ago by stanisc
Modified:
3 years, 7 months ago
Reviewers:
titzer
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Remove padding in v8::internal::compiler::Constant class. This makes the size of the class smaller by 8 bytes on 64-bit. I looked at the usage pattern. Even though it seems the number of instances doesn't get higher than a few thousand, this class is still very hot because it is constructed and passed by value a lot. So perhaps reducing the size would make passing this class by value or growing arrays more optimal and might save some cycles. Before: class v8::internal::compiler::Constant [sizeof = 24] { [sizeof=4] v8::internal::compiler::Constant::Type type_ <padding> (4 bytes) [sizeof=8] __int64 value_ [sizeof=4] v8::internal::RelocInfo::Mode rmode_ <padding> (4 bytes) } After: class v8::internal::compiler::Constant [sizeof = 16] { [sizeof=4] v8::internal::compiler::Constant::Type type_ [sizeof=4] v8::internal::RelocInfo::Mode rmode_ [sizeof=8] __int64 value_ } BUG=chromium:710933 Review-Url: https://codereview.chromium.org/2841343002 Cr-Commit-Position: refs/heads/master@{#45001} Committed: https://chromium.googlesource.com/v8/v8/+/9ede481a8c873058f76a315a89c8803868403913

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/compiler/instruction.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (12 generated)
brucedawson
Trivia: On Linux (and presumably OSX and Android) this class would already have no padding ...
3 years, 7 months ago (2017-04-27 17:18:38 UTC) #6
stanisc
PTAL!
3 years, 7 months ago (2017-04-27 17:52:32 UTC) #10
titzer
lgtm
3 years, 7 months ago (2017-04-30 23:51:09 UTC) #12
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/2841343002/1
3 years, 7 months ago (2017-05-01 03:35:53 UTC) #14
commit-bot: I haz the power
3 years, 7 months ago (2017-05-01 04:05:10 UTC) #17
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/v8/v8/+/9ede481a8c873058f76a315a89c88038684...

Powered by Google App Engine
This is Rietveld 408576698