|
|
DescriptionRemove 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 #
Messages
Total messages: 17 (12 generated)
The CQ bit was checked by stanisc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Remove padding in Constant class BUG= ========== to ========== Remove padding in Constant class BUG=710933 ==========
Trivia: On Linux (and presumably OSX and Android) this class would already have no padding on 32-bit builds, because int64_t only has four-byte alignment requirements on those 32-bit platforms. On Windows (32-bit and 64-bit) and 64-bit Linux, OSX, and Android this class had eight bytes of padding. The point being that this change helps all 64-bit processes, and 32-bit Windows processes. FYI.
Description was changed from ========== Remove padding in Constant class BUG=710933 ========== to ========== Remove padding in v8::internal::compiler::Constant class. This makes the size of the class smaller by 8 bytes. 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=710933 ==========
Description was changed from ========== Remove padding in v8::internal::compiler::Constant class. This makes the size of the class smaller by 8 bytes. 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=710933 ========== to ========== 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=710933 ==========
stanisc@chromium.org changed reviewers: + titzer@chromium.org
PTAL!
Description was changed from ========== 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=710933 ========== to ========== 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 ==========
lgtm
The CQ bit was checked by stanisc@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1493609746714790, "parent_rev": "e3207836388b1254dbb3e4b67a5822658b7a2dc4", "commit_rev": "9ede481a8c873058f76a315a89c8803868403913"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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/+/9ede481a8c873058f76a315a89c88038684... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/v8/v8/+/9ede481a8c873058f76a315a89c88038684... |