-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use once_cell to cache stdlib compilation in wasm (#124)
This adds simple caching of the stdlib compilation during check calls using OnceCell. Since the stdlib is static in the wasm layer and the store does not need to be mutable (the compilation unit for the checked user's code is not added to it), this can be done once for the lifetime of the loaded package and reused over and over. In local testing, this produced a 95% perf improvement on the check calls performed as the user types (from 2.3 ms to 0.1 ms).
- Loading branch information
Showing
4 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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