Bug 187462 - Use SegmentedVector<> instead of Bag<> if entry is so many allocated
Summary: Use SegmentedVector<> instead of Bag<> if entry is so many allocated
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-09 02:18 PDT by Yusuke Suzuki
Modified: 2018-07-09 11:27 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.