Title: [291866] trunk/Source/WebCore
- Revision
- 291866
- Author
- [email protected]
- Date
- 2022-03-25 10:39:07 -0700 (Fri, 25 Mar 2022)
Log Message
Reduce EventListenerVector's minimum capacity from 16 to 2
https://bugs.webkit.org/show_bug.cgi?id=238374
Reviewed by Geoffrey Garen.
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.
* dom/EventListenerMap.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (291865 => 291866)
--- trunk/Source/WebCore/ChangeLog 2022-03-25 17:32:48 UTC (rev 291865)
+++ trunk/Source/WebCore/ChangeLog 2022-03-25 17:39:07 UTC (rev 291866)
@@ -1,5 +1,18 @@
2022-03-25 Chris Dumez <[email protected]>
+ Reduce EventListenerVector's minimum capacity from 16 to 2
+ https://bugs.webkit.org/show_bug.cgi?id=238374
+
+ Reviewed by Geoffrey Garen.
+
+ 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.
+
+ * dom/EventListenerMap.h:
+
+2022-03-25 Chris Dumez <[email protected]>
+
Start preparing WebCore for making the String(const char*) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=238336
Modified: trunk/Source/WebCore/dom/EventListenerMap.h (291865 => 291866)
--- trunk/Source/WebCore/dom/EventListenerMap.h 2022-03-25 17:32:48 UTC (rev 291865)
+++ trunk/Source/WebCore/dom/EventListenerMap.h 2022-03-25 17:39:07 UTC (rev 291866)
@@ -43,7 +43,7 @@
class EventTarget;
-using EventListenerVector = Vector<RefPtr<RegisteredEventListener>, 1>;
+using EventListenerVector = Vector<RefPtr<RegisteredEventListener>, 1, CrashOnOverflow, 2>;
class EventListenerMap {
public:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes