Bug 187462

Summary: Use SegmentedVector<> instead of Bag<> if entry is so many allocated
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: saam, simon.fraser, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Yusuke Suzuki 2018-07-09 02:18:18 PDT
Bag<> is not space efficient if # of entries become so many.
Comment 1 Saam Barati 2018-07-09 11:13:22 PDT
Why? Isn't it just a linked list?
Comment 2 Yusuke Suzuki 2018-07-09 11:27:34 PDT
(In reply to Saam Barati from comment #1)
> Why? Isn't it just a linked list?

Bag adds a pointer to make them a linked list.
On the other hand, SegmentedVector does not. It allocates 8 (by default) elements in a batch manner.