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

Issue 6707001: Store HValue uses in a custom small list structure. (Closed)

Created:
9 years, 9 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Store HValue uses in a custom small list structure. This saves about 700K of zone allocation when compiling the V8 benchmark suite. Committed: http://code.google.com/p/v8/source/detail?r=7330

Patch Set 1 #

Total comments: 6

Patch Set 2 : Review fixes #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -4 lines) Patch
M src/hydrogen.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen-instructions.h View 1 4 chunks +4 lines, -3 lines 0 comments Download
A src/small-pointer-list.h View 1 1 chunk +162 lines, -0 lines 4 comments Download
M tools/gyp/v8.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M tools/v8.xcodeproj/project.pbxproj View 1 2 chunks +2 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base.vcproj View 1 1 chunk +4 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base_arm.vcproj View 1 1 chunk +4 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base_x64.vcproj View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vitaly Repeshko
9 years, 9 months ago (2011-03-17 15:09:50 UTC) #1
fschneider
Added Kevin. It seems to be a good idea to have a compact data structure ...
9 years, 9 months ago (2011-03-22 10:15:52 UTC) #2
Vitaly Repeshko
Florian, thanks for having a look! When testing locally I see no differences in compilation ...
9 years, 9 months ago (2011-03-22 17:07:49 UTC) #3
Kevin Millikin (Chromium)
LGTM! http://codereview.chromium.org/6707001/diff/4001/src/small-pointer-list.h File src/small-pointer-list.h (right): http://codereview.chromium.org/6707001/diff/4001/src/small-pointer-list.h#newcode62 src/small-pointer-list.h:62: PointerList* list = new PointerList(2); We should count ...
9 years, 9 months ago (2011-03-23 07:38:43 UTC) #4
Vitaly Repeshko
9 years, 9 months ago (2011-03-23 14:42:32 UTC) #5
Kevin, thanks for your comments!


-- Vitaly

http://codereview.chromium.org/6707001/diff/4001/src/small-pointer-list.h
File src/small-pointer-list.h (right):

http://codereview.chromium.org/6707001/diff/4001/src/small-pointer-list.h#new...
src/small-pointer-list.h:62: PointerList* list = new PointerList(2);
On 2011/03/23 07:38:44, Kevin Millikin wrote:
> We should count the lengths of use lists that are >= 2.  This backing store
will
> be resized as soon as we add a another use.  
> 
> If this is frequent, we should avoid the doubling and wasted 2-element list
and
> preallocate it a bit bigger.

When compiling the V8 benchmark the number of values with 2 uses is
approximately equal to the number of values with strictly more than 2 uses. So I
think it makes sense to keep 2 here.

http://codereview.chromium.org/6707001/diff/4001/src/small-pointer-list.h#new...
src/small-pointer-list.h:86: void RemoveElement(T* pointer) {
On 2011/03/23 07:38:44, Kevin Millikin wrote:
> Maybe a short comment that the intended semantics is to remove if present
(like
> List::RemoveElement).

Done.

Powered by Google App Engine
This is Rietveld 408576698