Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domtree: Optimize DFS! allocations #52880

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

topolarity
Copy link
Member

Since DFS! is a decent fraction of the work for updating the domtree, this should be a noticeable improvement to semi-concrete eval for very large functions.

Profiling downstream shows a lot of time spent push!ing into the worklist and creating temporary arrays.

Profiling downstream shows a lot of time spent `push!`ing into the
worklist and creating temporary arrays (which in this case were just an
indirect way of doing a `fill!(..., 0)`)

These changes should mean we allocate zero new Array's when updating the
DFS!, which is a frequent operation as part of updating the domtree when
performing semi-concrete eval.
Copy link
Member

@Keno Keno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change seems fine, but I'd be surprised if it actually had a significant impact. This kind of thing is often a profiling artifact.

@aviatesk
Copy link
Member

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk aviatesk merged commit a034aa1 into JuliaLang:master Jan 14, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants