Bug 238374 - Reduce EventListenerVector's minimum capacity from 16 to 2
Summary: Reduce EventListenerVector's minimum capacity from 16 to 2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-25 07:43 PDT by Chris Dumez
Modified: 2022-03-25 10:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.47 KB, patch)
2022-03-25 07:44 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-03-25 07:43:12 PDT
Reduce EventListenerVector's minimum capacity from 16 to 2 to save memory and get a small speedup on Speedometer.
Very few event listeners are registered for a given type in the common case so eagerly allocating enough memory for 16 is wasteful.
This is a confirmed 0.4% progression on Speedometer according to A/B bots.
Comment 1 Chris Dumez 2022-03-25 07:44:10 PDT
Created attachment 455760 [details]
Patch
Comment 2 Geoffrey Garen 2022-03-25 09:54:09 PDT
Comment on attachment 455760 [details]
Patch

r=me
Comment 3 EWS 2022-03-25 10:40:17 PDT
Committed r291866 (248872@main): <https://commits.webkit.org/248872@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455760 [details].
Comment 4 Radar WebKit Bug Importer 2022-03-25 10:41:18 PDT
<rdar://problem/90845294>