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

Issue 160382: Avoid dictionary expansion during bootstrapping (Closed)

Created:
11 years, 4 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
Reviewers:
Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Avoid dictionary expansion during bootstrapping. Allocate the code stubs dictionary and non monomorphic cache dictionary with an initial size which avoids these dictionaries to be expanded during bootstrapping. This gets rid of 9 dictionary expansions during bootstrapping. Preallocate the dictionary when normalizing an object to a size sufficient for holding the number of properties which is expected to be added to the object. This is used when ceating an object from an object literal boilerplate where multiple properties are known to be added. This gets rid of 10 dictionary expansions during bootstrapping. There are now 3 dictionary expansions left during bootstrapping. Committed: http://code.google.com/p/v8/source/detail?r=2584

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -21 lines) Patch
M src/handles.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M src/handles.cc View 2 chunks +11 lines, -4 lines 0 comments Download
M src/heap.cc View 1 chunk +6 lines, -4 lines 0 comments Download
M src/objects.h View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 8 chunks +16 lines, -9 lines 0 comments Download
M src/runtime.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
11 years, 4 months ago (2009-07-30 09:00:41 UTC) #1
Kasper Lund
LGTM, but: http://codereview.chromium.org/160382/diff/1011/15 File src/handles.h (right): http://codereview.chromium.org/160382/diff/1011/15#newcode185 Line 185: int expected_additional_properties = 0); I would ...
11 years, 4 months ago (2009-07-30 09:06:16 UTC) #2
Søren Thygesen Gjesse
11 years, 4 months ago (2009-07-30 09:12:00 UTC) #3
http://codereview.chromium.org/160382/diff/1011/15
File src/handles.h (right):

http://codereview.chromium.org/160382/diff/1011/15#newcode185
Line 185: int expected_additional_properties = 0);
On 2009/07/30 09:06:16, Kasper Lund wrote:
> I would get rid of default values for expected_additional_properties and just
> make it explicit everywhere (and >= 0).

Done.

http://codereview.chromium.org/160382/diff/1011/12
File src/objects.cc (right):

http://codereview.chromium.org/160382/diff/1011/12#newcode2139
Line 2139: property_count += 2;  // Make spece for two more properties.
On 2009/07/30 09:06:16, Kasper Lund wrote:
> spece -> space

Done.

Powered by Google App Engine
This is Rietveld 408576698