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

Issue 661105: Faster filling of arrays of holes. (Closed)

Created:
10 years, 10 months ago by antonm
Modified:
9 years, 4 months ago
Reviewers:
Søren Thygesen Gjesse, sgjesse
CC:
v8-dev
Visibility:
Public.

Description

Faster filling of arrays of holes. Committed: http://code.google.com/p/v8/source/detail?r=3977

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressing comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -5 lines) Patch
M src/heap.cc View 1 1 chunk +4 lines, -5 lines 0 comments Download
M src/utils.h View 1 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Søren, may you have a look? There might be even faster implementations, but let's start ...
10 years, 10 months ago (2010-02-25 20:14:18 UTC) #1
Søren Thygesen Gjesse
LGTM You could look at the code generated for the loop on ARM - it ...
10 years, 10 months ago (2010-02-25 21:40:14 UTC) #2
antonm
10 years, 10 months ago (2010-02-26 11:54:39 UTC) #3
> You could look at the code generated for the loop on ARM - it probably cannot
be improved.

The problem is gcc with current defaults generates plain loop for ia32.  I
googled a bit, but all the memset32 implementations I found seems to use loop
(with some unrolling).

> Are there other placed we can use this. I am thinking filling hash tables with
undefined.

Yes, undefined and I suspect that stub which creates Array for new Array doesn't
use stos as well.  Going to audit the code.

Thanks a lot for review, Søren, submitting.

http://codereview.chromium.org/661105/diff/1/2
File src/heap.cc (right):

http://codereview.chromium.org/661105/diff/1/2#newcode2981
src/heap.cc:2981: // update RSets.
On 2010/02/25 21:40:15, Søren Gjesse wrote:
> Please keep the assert.

Done.

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

http://codereview.chromium.org/661105/diff/1/3#newcode584
src/utils.h:584: asm("cld\n\trep\n\t" STOS
On 2010/02/25 21:40:15, Søren Gjesse wrote:
> Please break this into one instruction per line for better redability.

Done.

http://codereview.chromium.org/661105/diff/1/3#newcode587
src/utils.h:587: :);
On 2010/02/25 21:40:15, Søren Gjesse wrote:
> Maybe make a comment why the clobber list is empty.

Done.

http://codereview.chromium.org/661105/diff/1/3#newcode594
src/utils.h:594: #undef HAS_STOS
On 2010/02/25 21:40:15, Søren Gjesse wrote:
> HAS_STOS -> STOS

Done.

Powered by Google App Engine
This is Rietveld 408576698