-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schema-wasm: optimize for
-Oz
with LLVM and Binaryen
This PR explores how much size can be trivially saved in WASM binaries compared to how we currently build them, using `prisma-schema-wasm` as the example. This is not necessarily useful for `prisma-schema-wasm` but could be useful for the QE. - Enable more aggressive size optimization level in LLVM (`z` instead of `s`) at some runtime performance cost. - Further optimize the WASM binary for size using `wasm-opt` from Binaryen. | optimization level | size | ratio | | ---------------------- | ------- | ------ | | `-Os` (baseline) | 2742189 | 100% | | `-Oz` | 2558271 | 93.29% | | `-Oz` + `wasm-opt -Oz` | 2081699 | 75.91% |
- Loading branch information
Showing
3 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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