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

Issue 8011: Use direct copy and templates to speed up flattening of strings. (Closed)

Created:
12 years, 2 months ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Use direct copy and templates to speed up flattening of strings. Committed: http://code.google.com/p/v8/source/detail?r=549

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -100 lines) Patch
M src/factory.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap.cc View 2 chunks +24 lines, -19 lines 2 comments Download
M src/objects.h View 6 chunks +11 lines, -11 lines 0 comments Download
M src/objects.cc View 8 chunks +104 lines, -49 lines 16 comments Download
M src/objects-inl.h View 1 chunk +6 lines, -0 lines 2 comments Download
M src/runtime.cc View 3 chunks +37 lines, -21 lines 0 comments Download
M src/utils.h View 1 chunk +13 lines, -0 lines 3 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
12 years, 2 months ago (2008-10-21 13:36:57 UTC) #1
Christian Plesner Hansen
Lgtm with a whole bunch of comments. http://codereview.chromium.org/8011/diff/1/2 File src/heap.cc (right): http://codereview.chromium.org/8011/diff/1/2#newcode1359 Line 1359: byte* ...
12 years, 2 months ago (2008-10-21 14:16:22 UTC) #2
Erik Corry
12 years, 2 months ago (2008-10-22 11:59:48 UTC) #3
http://codereview.chromium.org/8011/diff/1/2
File src/heap.cc (right):

http://codereview.chromium.org/8011/diff/1/2#newcode1359
Line 1359: byte* dest = SeqAsciiString::cast(result)->GetCharsAddress();
I've tried to use char consistently, since the name fits the use and the
problems with signed vs. unsigned char shouldn't matter for ASCII.

http://codereview.chromium.org/8011/diff/1/7
File src/objects-inl.h (right):

http://codereview.chromium.org/8011/diff/1/7#newcode1372
Line 1372: int String::full_representation_tag() {
This one is certainly trivial.

http://codereview.chromium.org/8011/diff/1/3
File src/objects.cc (right):

http://codereview.chromium.org/8011/diff/1/3#newcode547
Line 547: SeqTwoByteString::cast(result)->GetCharsAddress());
Good idea.

http://codereview.chromium.org/8011/diff/1/3#newcode2914
Line 2914: const byte* start = reinterpret_cast<const
byte*>(ext->resource()->data());
Done

http://codereview.chromium.org/8011/diff/1/3#newcode3591
Line 3591: memcpy(
Done.

http://codereview.chromium.org/8011/diff/1/3#newcode3606
Line 3606: case kTwoByteStringTag + kExternalStringTag: {
Done

http://codereview.chromium.org/8011/diff/1/3#newcode3616
Line 3616: const byte* src =
The non-memcpy may be marginally faster, but this is removed in the new version.

http://codereview.chromium.org/8011/diff/1/3#newcode3623
Line 3623: Cpy168(
Gone in new version.

http://codereview.chromium.org/8011/diff/1/3#newcode3652
Line 3652: if (boundary < 64 || to - boundary >= boundary - from) {
I got rid of this optimization because I found a test failure and the fix would
probably deoptimize the optimization.

http://codereview.chromium.org/8011/diff/1/3#newcode3748
Line 3748: VectorIterator<const byte> ib(b->ToAsciiVector());
OK

http://codereview.chromium.org/8011/diff/1/6
File src/utils.h (right):

http://codereview.chromium.org/8011/diff/1/6#newcode451
Line 451: static inline void Cpy168(sinkchar* dest, const unsigned char* src,
int chars) {
Can't do this because of alignment issues.

Powered by Google App Engine
This is Rietveld 408576698