Optimize for size in preamble.js/postamble.js. NFC#27136
Open
sbc100 wants to merge 1 commit into
Open
Conversation
- Regarding using `throw e` vs `reject(e)`, these are defined to be the same thing inside the `new Promise` executor function. The following (34) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_ctors1.json: 151862 => 151768 [-94 bytes / -0.06%] codesize/test_codesize_cxx_ctors2.json: 151265 => 151171 [-94 bytes / -0.06%] codesize/test_codesize_cxx_except.json: 195756 => 195664 [-92 bytes / -0.05%] codesize/test_codesize_cxx_except_wasm.json: 166986 => 166892 [-94 bytes / -0.06%] codesize/test_codesize_cxx_except_wasm_legacy.json: 164870 => 164776 [-94 bytes / -0.06%] codesize/test_codesize_cxx_lto.json: 120704 => 120611 [-93 bytes / -0.08%] codesize/test_codesize_cxx_mangle.json: 262235 => 262143 [-92 bytes / -0.04%] codesize/test_codesize_cxx_noexcept.json: 153862 => 153768 [-94 bytes / -0.06%] codesize/test_codesize_cxx_wasmfs.json: 179611 => 179514 [-97 bytes / -0.05%] test/codesize/test_codesize_file_preload.expected.js updated codesize/test_codesize_file_preload.json: 23778 => 23751 [-27 bytes / -0.11%] codesize/test_codesize_files_js_fs.json: 18225 => 18131 [-94 bytes / -0.52%] codesize/test_codesize_files_wasmfs.json: 63692 => 63596 [-96 bytes / -0.15%] codesize/test_codesize_hello_O0.json: 38459 => 38366 [-93 bytes / -0.24%] codesize/test_codesize_hello_O1.json: 8708 => 8633 [-75 bytes / -0.86%] codesize/test_codesize_hello_O2.json: 6132 => 6040 [-92 bytes / -1.50%] codesize/test_codesize_hello_O3.json: 5827 => 5735 [-92 bytes / -1.58%] codesize/test_codesize_hello_Os.json: 5815 => 5723 [-92 bytes / -1.58%] codesize/test_codesize_hello_Oz.json: 4988 => 4895 [-93 bytes / -1.86%] codesize/test_codesize_hello_dylink.json: 44130 => 44025 [-105 bytes / -0.24%] codesize/test_codesize_hello_dylink_all.json: 855887 => 855791 [-96 bytes / -0.01%] codesize/test_codesize_hello_export_nothing.json: 3119 => 3033 [-86 bytes / -2.76%] codesize/test_codesize_hello_single_file.json: 5139 => 5042 [-97 bytes / -1.89%] codesize/test_codesize_hello_wasmfs.json: 5827 => 5735 [-92 bytes / -1.58%] codesize/test_codesize_libcxxabi_message_O3.json: 3516 => 3423 [-93 bytes / -2.65%] codesize/test_codesize_libcxxabi_message_O3_standalone.json: 3696 => 3610 [-86 bytes / -2.33%] codesize/test_codesize_mem_O3.json: 9516 => 9425 [-91 bytes / -0.96%] codesize/test_codesize_mem_O3_grow.json: 9802 => 9711 [-91 bytes / -0.93%] codesize/test_codesize_mem_O3_grow_standalone.json: 9653 => 9563 [-90 bytes / -0.93%] codesize/test_codesize_mem_O3_standalone.json: 9510 => 9424 [-86 bytes / -0.90%] codesize/test_codesize_mem_O3_standalone_lib.json: 8707 => 8619 [-88 bytes / -1.01%] codesize/test_codesize_mem_O3_standalone_narg.json: 8828 => 8742 [-86 bytes / -0.97%] codesize/test_codesize_mem_O3_standalone_narg_flto.json: 7759 => 7673 [-86 bytes / -1.11%] codesize/test_unoptimized_code_size.json: 176271 => 176161 [-110 bytes / -0.06%] Average change: -0.83% (-2.76% - -0.01%) ```
kripken
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
throw evsreject(e), these are defined to be the same thing inside thenew Promiseexecutor function.The following (34) test expectation files were updated by running the tests with
--rebaseline: