-
Notifications
You must be signed in to change notification settings - Fork 449
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
irgen: Generate explicit instantiations #4681
Conversation
ChrisDodd
commented
May 27, 2024
- explicit instantiations for all Vector and IndexedVector used in any .def file
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.
Sorry I got caught by other work. I have to check that this does not break anything is someone tried to instantiate ( EDIT: no problem there. |
Hmm, I'm seeing only part of the improvement in this branch compared to my branch (after just one run, will confirm once the rest finishes). Could it be that for this to work fully the Is it possible to move the declarations at the beginning, or is the ir-generator too much single-pass? |
OK, so these are the results for release build (similar to #4674 (comment)):
So this PR stands in-between the two previous benchmarks, although significantly closer to #4680. I agree this is the better approach overall (and downstream tools that have new IR nodes with Vector/IndexedVector will benefit more from it), but it would be good to move the declarations at the beginning to see if that helps (or maybe put them in a separate header and include that one directly to |
I'll try moving them earlier, but I think the instantiations need to be after the declarations of the classes that are used as parameters to the template? |
660adb3
to
9774e21
Compare
- explicit instantiations for all Vector and IndexedVector used in any .def file
Ok, I've moved the |
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.
Now the results are pretty much the same:
# this PR
Time (mean ± σ): 566.911 s ± 3.272 s [User: 11686.466 s, System: 588.923 s]
Range (min … max): 562.361 s … 570.533 s 5 runs
# my approach
Time (mean ± σ): 564.324 s ± 3.548 s [User: 12161.493 s, System: 618.834 s]
Range (min … max): 561.535 s … 570.435 s 5 runs
(I had to re-measure both as the PR base moved).
So the same. Thank you for this.