NEW 100828
GC should shrink arrays to fit in the smallest sensible amount of memory
https://bugs.webkit.org/show_bug.cgi?id=100828
Summary GC should shrink arrays to fit in the smallest sensible amount of memory
Filip Pizlo
Reported 2012-10-31 01:19:47 PDT
This will mostly prevent us from having to reason about a priori thresholds for sparse array logic. If in doubt, JSC should be able to just allocate a large contiguous array and leave it to the GC to figure out whether or not that was a good idea. That might imply that the GC should also be able to create sparse maps as needed. Most likely the best way to do it will be that if the GC detects that an array would benefit from a sparse map and that array doesn't already have a sparse map, then it should defer the sparse map creation. It can be done as part of sweeping, or something. I'm marking this as depending on https://bugs.webkit.org/show_bug.cgi?id=100827. Really it's related to the other bug. I want to first bump up the sparse map size threshold and then later worry about the heuristics to make it safe-for-space in all of the various pathological corner cases.
Attachments
the patch (1.65 KB, patch)
2012-10-31 01:29 PDT, Filip Pizlo
fpizlo: review-
Filip Pizlo
Comment 1 2012-10-31 01:29:14 PDT
Created attachment 171595 [details] the patch
Filip Pizlo
Comment 2 2012-10-31 01:29:44 PDT
Comment on attachment 171595 [details] the patch Ahhh!! Never mind. I posted this patch to the wrong bug.
Geoffrey Garen
Comment 3 2012-10-31 08:45:19 PDT
FWIW, I think we should apply the same logic to named property backing stores.
Oliver Hunt
Comment 4 2012-10-31 08:59:50 PDT
(In reply to comment #3) > FWIW, I think we should apply the same logic to named property backing stores. We'd need to deal with structure implying backing store size
Note You need to log in before you can comment on or make changes to this bug.