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

gf: accelerate adding backedges back to old performance #48966

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Mar 10, 2023

Since it does not compute and branch on typeof, in my measurements, this implementation is about 10x faster!

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

Since it does not compute and branch on typeof, in my measurements, this
implementation is about 10x faster!
@vtjnash vtjnash added compiler:latency Compiler latency backport 1.9 Change should be backported to release-1.9 labels Mar 10, 2023
@timholy
Copy link
Member

timholy commented Mar 10, 2023

Did this regress in #46010? If so, maybe I should think about adding a benchmark. It doesn't seem easy, though, because it's not a step that's easy to isolate.

@nanosoldier
Copy link
Collaborator

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

@vtjnash
Copy link
Member Author

vtjnash commented Mar 10, 2023

As you can see in the report, it actually had significantly regressed a benchmark (many_local_vars, née quadratic), but we hadn't done anything about it yet dd375e1#commitcomment-83236324

@timholy
Copy link
Member

timholy commented Mar 10, 2023

Ah, that does ring a bell. Thanks for explaining, and especially for fixing it!

@vtjnash vtjnash merged commit 369660f into master Mar 10, 2023
@vtjnash vtjnash deleted the jn/backedge-add-perf branch March 10, 2023 23:04
@aviatesk
Copy link
Member

Nice improvements! Do you think it would be worthwhile to try implementing a similar optimization at the Julia level? Specifically, the inlining code often adds duplicated backedges, but we could use IdSet there to prevent the duplication.

KristofferC pushed a commit that referenced this pull request Mar 24, 2023
Since it does not compute and branch on typeof, in my measurements, this
implementation is up to 10x faster!

(cherry picked from commit 369660f)
@KristofferC KristofferC mentioned this pull request Mar 24, 2023
52 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Mar 31, 2023
Xnartharax pushed a commit to Xnartharax/julia that referenced this pull request Apr 19, 2023
)

Since it does not compute and branch on typeof, in my measurements, this
implementation is up to 10x faster!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants