-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #16434, superlinear compiler run time on large functions
improves the algorithm in `type_annotate!` to look only at uses of variables instead of (all variables)*(all statements)
- Loading branch information
1 parent
6591216
commit 1dae0e0
Showing
1 changed file
with
45 additions
and
28 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
1dae0e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a guarantee that compilation time should scale linearly now? If so, that is huge. Compilation time was a big issue for JuMP's AD until we rewrote it to not dynamically generate code...
1dae0e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not; there are certainly still super-linear algorithms in the compiler, but you won't always hit those cases. Would be interesting to see if this helps the AD code.
1dae0e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mlubin: If you run into other superlinear cases, please file issues about them!
I guess that superlinear scaling is not always avoidable, but when it is I hope we might as well try to do it.