https://codereview.chromium.org/1105693002/diff/40001/src/heap/identity-map.cc
File src/heap/identity-map.cc (right):

https://codereview.chromium.org/1105693002/diff/40001/src/heap/identity-map.cc#newcode13
src/heap/identity-map.cc:13: static const int kInitialIdentityMapSize =
32;
On 2015/04/28 09:32:34, Erik Corry wrote:
I just reduced the similar constant for element dictionaries from 32
to 4 at no
cost in performance.  Let's not burn memory if we can avoid it.

Done.

https://codereview.chromium.org/1105693002/diff/40001/src/heap/identity-map.cc#newcode14
src/heap/identity-map.cc:14: static const int kResizeFactor = 4;
On 2015/04/28 09:32:34, Erik Corry wrote:
Add a comment that the correctness of the table depends on this being
= 4

Alternatively change from a consecutive-collisions based growing
heuristic to a
more conventional fullness-based heuristic.  This would prevent the
growth from
being dependent on a source of randomness (ASLR).

As written, it doesn't. It will just keep resizing and trying to insert
until the longest collision chain is less than the limit. It so happens
that 4x guarantees that it will never iterate more than once.

https://codereview.chromium.org/1105693002/diff/40001/src/heap/identity-map.cc#newcode172
src/heap/identity-map.cc:172: CHECK_LE(size_, (1024 * 1024 * 16));  //
that would be extreme...
On 2015/04/28 09:32:34, Erik Corry wrote:
You really want to deliberately crash the release mode VM for this?
Also capital 't'.

Good question...then again, having 16 million entries in such a hashmap
is going to be a performance problem and might indicate a bug elsewhere.

https://codereview.chromium.org/1105693002/diff/40001/src/heap/identity-map.cc#newcode188
src/heap/identity-map.cc:188: heap_->RegisterStrongRoots(keys_, keys_ +
size_);
On 2015/04/28 09:32:34, Erik Corry wrote:
Where do we free the keys and values?

They're zone-allocated.

https://codereview.chromium.org/1105693002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to