[webkit-changes] [WebKit/WebKit] 6aa472: REGRESSION (282580 at main): 4.5MB binary size increase
Sam Weinig
noreply at github.com
Tue Sep 17 16:14:48 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6aa472c27a8ade5cad6dffe3f8a809688d9d559f
https://github.com/WebKit/WebKit/commit/6aa472c27a8ade5cad6dffe3f8a809688d9d559f
Author: Sam Weinig <sam at webkit.org>
Date: 2024-09-17 (Tue, 17 Sep 2024)
Changed paths:
M Source/WTF/wtf/Compiler.h
M Source/WTF/wtf/StdLibExtras.h
Log Message:
-----------
REGRESSION (282580 at main): 4.5MB binary size increase
https://bugs.webkit.org/show_bug.cgi?id=279498
Reviewed by Darin Adler.
The implementation of std::visit in some standard library implementations,
including the current libc++, can cause excessive code generation size.
This works around it for the case of a visit with a single variant, the
most common use case in WebKit and the one used by WTF::switchOn, by
using a switch-based implementation.
Measured locally, this is a ~10% code size improvement for WebCore.framework:
FILE SIZE VM SIZE
-------------- --------------
+0.8% +5.41Ki +0.8% +5.41Ki __TEXT,__const
+105% +5.31Ki +105% +5.31Ki [__TEXT]
+0.0% +2 +0.0% +2 __TEXT,__objc_methname
-0.3% -8 -0.3% -8 __TEXT,__eh_frame
-0.0% -44 -0.0% -44 __TEXT,__gcc_except_tab
-0.0% -198 -0.0% -198 __TEXT,__cstring
-0.3% -216 -0.3% -216 __TEXT,__unwind_info
[ = ] 0 -0.4% -4.00Ki [__LINKEDIT]
-2.8% -6.79Ki -2.8% -6.79Ki Function Start Addresses
-70.8% -6.98Ki -70.8% -6.98Ki [__DATA_CONST]
-2.1% -57.0Ki -2.1% -57.0Ki __DATA_CONST,__const
-10.0% -91.6Ki -10.0% -91.6Ki Code Signature
-0.4% -154Ki -0.4% -154Ki __TEXT,__text
-3.6% -502Ki -3.6% -502Ki Symbol Table
-20.0% -10.8Mi -20.0% -10.8Mi String Table
-10.2% -11.5Mi -10.2% -11.5Mi TOTAL
* Source/WTF/wtf/Compiler.h:
* Source/WTF/wtf/StdLibExtras.h:
Canonical link: https://commits.webkit.org/283806@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list