-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: # Explanations for the whole stack: D58068275 to this `Evaluator.module_variables` contains captured frozen module. Which is used mostly to access frozen module variables from unfrozen functions (e.g. lambdas). Before this diff, on each `def` enter we updated this variable. This is rarely needed, because most frozen globals are inlined by the optimizer. `def` invocation is expensive, and removing any code from it helps (e.g. makes compiler inline more). With this stack, we no longer update `module_variables`, but instead, when a module is needed, it is obtained from top frame def (which is currently evaluated def). Don't pay for what we don't use. Reviewed By: JakobDegen Differential Revision: D58068387 fbshipit-source-id: 10559f3979e7ef58b1b0c4ffef6b937a643cc580
- Loading branch information
1 parent
f3570ee
commit 4942595
Showing
3 changed files
with
2 additions
and
29 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