-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize further reducing the inlining of function applications
Optimize for smaller emitted module sizes and less processing in the Elm compiler: Remove the inlining of function declarations in `emitExpressionInDeclarationBlock` Later stages will implement more inlining to optimize code emitted here for runtime. Moving the inlining to later stages makes it easier for many source languages like Elm/Roc/Gren/Cara/etc. to benefit from these optimizations. Testing this change with a part of the Elm core Dict module from (https://github.com/elm/core/blob/84f38891468e8e153fc85a9b63bdafd81b24664e/src/Dict.elm) showed a reduction of the emitted module size to half the previous size. The inlining can also lead to a smaller aggregate size, so this change will also make some modules larger. We could keep inlining here and make it more adaptive, but at the moment, I prefer the simpler Elm compiler implementation.
- Loading branch information
Showing
3 changed files
with
25 additions
and
41 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