[Webkit-unassigned] [Bug 86434] RuleSet::addToRuleSet wastes a bit of Vector capacity

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 15 09:59:41 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86434





--- Comment #10 from Andreas Kling <kling at webkit.org>  2012-05-15 09:58:42 PST ---
(In reply to comment #8)
> In cases like this where we know the size the RuleSet will be before we create it, it would be more efficient to reserve capacity than to shrink to fit. All we’d have to do is make a RuleSet::create function overload that takes a capacity.
> 
> What do you guys think of that idea?

I like the idea in principle. If you look at the implementation of RuleSet::shrinkToFit() however, it's nontrivial to predict at RuleSet::create() time how big each subvector should be.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list