-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accumulate virtual stack trace on returning back to the parent frame,…
… try to fix performance problem (#90) accumulate virtual stack trace on returning back to the parent frame The idea is to stop a frame chain traversal on report construction or cached report restoring, but rather update reports "frame-by-frame". Before exiting the local inference (or cache retrieval), we keeps reports that should be updated in `interp.to_be_updated` and they will be updated when returning back to the parent frame (i.e. the next inter-procedural context). This should eliminate lots of the previous frame chain traversal works, and should give us some performance improvements, especially we're analyzing deep frames. Caveat: For now I couldn't find a right way to handle mutual recursion cycle. As such JET doesn't always make the following condition hold, and thus its stack trace could be wrong. ```julia # in `_typeinf` or cache retrieval points @Assert first(report.st).linfo === current_linfo ``` I'd like to leave this problem as a future work for now, and improve performance for now.
- Loading branch information
Showing
7 changed files
with
139 additions
and
128 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
Oops, something went wrong.