Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various speed ups by avoiding work and memory allocations
- Combine filter -> forEach chains - Extract deeply nested functions to higher scopes - Promote shared or mostly-constant values and conditionals to higher scopes - Swap compound boolean expressions to exploit short circuiting - Push expensive operations below guards / early returns - Push expensive operations into conditionals to exploit short circuiting - Swap filters for finds when possible - Swap some array function orders, e.g. Filter before reversing arrays
- Loading branch information
1 parent
d16fcb3
commit 232d6a1
Showing
24 changed files
with
293 additions
and
234 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
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
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
Oops, something went wrong.