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

Issue 2893553002: More compact string representation on 64 bit. (Closed)

Created:
3 years, 7 months ago by erikcorry
Modified:
3 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

More compact string representation on 64 bit. This moves the hash code into the header word for strings on 64 bit platforms. With the old layout, 9 character strings became 48-byte objects. With the new layout you have to go to 17 characters before you are bumped from 4 to 6 words (32 to 48 bytes). As a side effect, the class ID field is now 16 bits on all platforms instead of having two different sizes, and the size field is 8 bits on all platforms. This also paves the way for moving the hash code for instance objects into the header, so we won't need the side-lookup in the hash-table-of-hash-codes on 64 bit platforms. R=vegorov@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/5c8e472c82f8c403b3e628a40ca0be5fbefa7706

Patch Set 1 #

Total comments: 20

Patch Set 2 : Slava feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -167 lines) Patch
M runtime/platform/globals.h View 1 chunk +0 lines, -6 lines 0 comments Download
M runtime/vm/assembler_arm64.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/assembler_x64.cc View 3 chunks +8 lines, -8 lines 0 comments Download
M runtime/vm/clustered_snapshot.cc View 1 5 chunks +10 lines, -10 lines 0 comments Download
M runtime/vm/dart.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/globals.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_arm64.cc View 9 chunks +25 lines, -25 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 9 chunks +24 lines, -25 lines 0 comments Download
M runtime/vm/intrinsifier_arm.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/intrinsifier_arm64.cc View 1 7 chunks +19 lines, -13 lines 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 7 chunks +24 lines, -13 lines 0 comments Download
M runtime/vm/object.h View 1 8 chunks +47 lines, -12 lines 0 comments Download
M runtime/vm/object.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 4 chunks +12 lines, -10 lines 0 comments Download
M runtime/vm/raw_object.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/simulator_dbc.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M runtime/vm/stub_code_arm.cc View 2 chunks +7 lines, -5 lines 0 comments Download
M runtime/vm/stub_code_arm64.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 3 chunks +8 lines, -5 lines 0 comments Download
M runtime/vm/stub_code_mips.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 4 chunks +10 lines, -7 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
erikcorry
3 years, 7 months ago (2017-05-17 08:06:16 UTC) #1
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/2893553002/diff/1/runtime/vm/intrinsifier_arm64.cc File runtime/vm/intrinsifier_arm64.cc (right): https://codereview.chromium.org/2893553002/diff/1/runtime/vm/intrinsifier_arm64.cc#newcode1827 runtime/vm/intrinsifier_arm64.cc:1827: __ SmiTag(R0); if you use something that sets ...
3 years, 7 months ago (2017-05-18 06:14:43 UTC) #2
erikcorry
Committed patchset #2 (id:20001) manually as 5c8e472c82f8c403b3e628a40ca0be5fbefa7706 (presubmit successful).
3 years, 7 months ago (2017-05-18 09:55:49 UTC) #4
erikcorry
https://codereview.chromium.org/2893553002/diff/1/runtime/vm/intrinsifier_arm64.cc File runtime/vm/intrinsifier_arm64.cc (right): https://codereview.chromium.org/2893553002/diff/1/runtime/vm/intrinsifier_arm64.cc#newcode1827 runtime/vm/intrinsifier_arm64.cc:1827: __ SmiTag(R0); On 2017/05/18 06:14:42, Vyacheslav Egorov (Google) wrote: ...
3 years, 7 months ago (2017-05-18 14:28:38 UTC) #5
sra1
Is reducing the class-id bits a wise direction? Our largest app has a hair under ...
3 years, 7 months ago (2017-05-18 15:13:14 UTC) #7
sra1
On 2017/05/18 15:13:14, sra1 wrote: > Is reducing the class-id bits a wise direction? > ...
3 years, 7 months ago (2017-05-18 15:46:22 UTC) #8
sra1
On 2017/05/18 15:13:14, sra1 wrote: > Is reducing the class-id bits a wise direction? > ...
3 years, 7 months ago (2017-05-18 15:46:24 UTC) #9
sra1
On 2017/05/18 15:13:14, sra1 wrote: > Is reducing the class-id bits a wise direction? > ...
3 years, 7 months ago (2017-05-18 15:46:25 UTC) #10
sra1
On 2017/05/18 15:13:14, sra1 wrote: > Is reducing the class-id bits a wise direction? > ...
3 years, 7 months ago (2017-05-18 15:46:28 UTC) #11
sra1
On 2017/05/18 15:13:14, sra1 wrote: > Is reducing the class-id bits a wise direction? > ...
3 years, 7 months ago (2017-05-18 15:46:30 UTC) #12
sra1
On 2017/05/18 15:13:14, sra1 wrote: > Is reducing the class-id bits a wise direction? > ...
3 years, 7 months ago (2017-05-18 15:46:31 UTC) #13
Vyacheslav Egorov (Google)
3 years, 7 months ago (2017-05-22 10:39:35 UTC) #14
Message was sent while issue was closed.
For the sake of future generations who will find this code review: we have
discussed Stephen's concerns over chat with him and arrived to the conclusion
that optimizing current memory usage is maintaining current ability to run
gigantic apps: because memory savings are concrete, but gigantic apps are
hypothetical.

We can always move back to the old representation of CID field later if gigantic
apps become reality.

Powered by Google App Engine
This is Rietveld 408576698