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

Skip assertion list look ups where unnecessary #73142

Merged
merged 7 commits into from
Aug 18, 2022

Conversation

kunalspathak
Copy link
Member

Below is the list of metrics that I gathered before and after this change. They are based upon the instrumentation I added in #73035.

  • *CallCount : Number of times we go through the look-up of that assertion category.
  • *MissedCount : Number of times we don't find any match of that assertion category.
  • *MissedIter: Number of iterations we spend before we realize there is no match.

Benchmarks

Metrics Main PR Diff Diff %
NoNullCallCount: 199981 199341 -640 -0.32%
NoNullMissedCount: 60178 59538 -640 -1.06%
NoNullMissedIter: 303178 301984 -1194 -0.39%
PropBndChkCallCount: 34049 34019 -30 -0.09%
PropBndChkMissedCount: 24860 24830 -30 -0.12%
PropBndChkMissedIter: 199594 199421 -173 -0.09%
PropLclVarCallCount: 2059107 1363307 -695800 -33.79%
PropLclVarMissedCount: 1944506 1248706 -695800 -35.78%
PropLclVarMissedIter: 8676449 6027084 -2649365 -30.54%
SubRangeCallCount: 96002 24802 -71200 -74.17%
SubRangeMissedCount: 94776 23576 -71200 -75.12%
SubRangeMissedIter: 424824 102679 -322145 -75.83%
Grand Total 30072122 25563905 -4508217 -14.99%

Libraries

Metrics Main PR Diff Diff %
NoNullCallCount: 1310379 1307300 -3079 -0.23%
NoNullMissedCount: 453249 450170 -3079 -0.68%
NoNullMissedIter: 1975011 1969804 -5207 -0.26%
PropBndChkCallCount: 63089 62973 -116 -0.18%
PropBndChkMissedCount: 45309 45193 -116 -0.26%
PropBndChkMissedIter: 344328 343546 -782 -0.23%
PropEqualOrNotCallCount: 294827 294826 -1 0.00%
PropEqualOrNotMissedCount: 275857 275856 -1 0.00%
PropEqualOrNotMissedIter: 1301740 1301739 -1 0.00%
PropEqualZeroCallCount: 741463 741456 -7 0.00%
PropEqualZeroMissedCount: 741052 741045 -7 0.00%
PropEqualZeroMissedIter: 3785718 3785711 -7 0.00%
PropLclVarCallCount: 8686514 7010713 -1675801 -19.29%
PropLclVarMissedCount: 8300379 6624578 -1675801 -20.19%
PropLclVarMissedIter: 35950996 31782991 -4168005 -11.59%
SubRangeCallCount: 255571 122810 -132761 -51.95%
SubRangeMissedCount: 250068 117307 -132761 -53.09%
SubRangeMissedIter: 1079732 433215 -646517 -59.88%
Grand Total 126889858 118445809 -8444049 -6.65%

Asp

Metrics Main PR Diff Diff %
NoNullCallCount: 364032 362798 -1234 -0.34%
NoNullMissedCount: 114676 113442 -1234 -1.08%
NoNullMissedIter: 430855 428532 -2323 -0.54%
PropBndChkCallCount: 16880 16816 -64 -0.38%
PropBndChkMissedCount: 12908 12844 -64 -0.50%
PropBndChkMissedIter: 90483 90192 -291 -0.32%
PropEqualZeroCallCount: 241334 241333 -1 0.00%
PropEqualZeroMissedCount: 241250 241249 -1 0.00%
PropEqualZeroMissedIter: 1176971 1176970 -1 0.00%
PropLclVarCallCount: 2005365 1812875 -192490 -9.60%
PropLclVarMissedCount: 1911628 1719138 -192490 -10.07%
PropLclVarMissedIter: 8011006 7560579 -450427 -5.62%
SubRangeCallCount: 71947 37891 -34056 -47.33%
SubRangeMissedCount: 69099 35043 -34056 -49.29%
SubRangeMissedIter: 277427 136446 -140981 -50.82%
Grand Total 34326677 33276964 -1049713 -3.06%

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 1, 2022
@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

@ghost ghost assigned kunalspathak Aug 1, 2022
@ghost
Copy link

ghost commented Aug 1, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Below is the list of metrics that I gathered before and after this change. They are based upon the instrumentation I added in #73035.

  • *CallCount : Number of times we go through the look-up of that assertion category.
  • *MissedCount : Number of times we don't find any match of that assertion category.
  • *MissedIter: Number of iterations we spend before we realize there is no match.

Benchmarks

Metrics Main PR Diff Diff %
NoNullCallCount: 199981 199341 -640 -0.32%
NoNullMissedCount: 60178 59538 -640 -1.06%
NoNullMissedIter: 303178 301984 -1194 -0.39%
PropBndChkCallCount: 34049 34019 -30 -0.09%
PropBndChkMissedCount: 24860 24830 -30 -0.12%
PropBndChkMissedIter: 199594 199421 -173 -0.09%
PropLclVarCallCount: 2059107 1363307 -695800 -33.79%
PropLclVarMissedCount: 1944506 1248706 -695800 -35.78%
PropLclVarMissedIter: 8676449 6027084 -2649365 -30.54%
SubRangeCallCount: 96002 24802 -71200 -74.17%
SubRangeMissedCount: 94776 23576 -71200 -75.12%
SubRangeMissedIter: 424824 102679 -322145 -75.83%
Grand Total 30072122 25563905 -4508217 -14.99%

Libraries

Metrics Main PR Diff Diff %
NoNullCallCount: 1310379 1307300 -3079 -0.23%
NoNullMissedCount: 453249 450170 -3079 -0.68%
NoNullMissedIter: 1975011 1969804 -5207 -0.26%
PropBndChkCallCount: 63089 62973 -116 -0.18%
PropBndChkMissedCount: 45309 45193 -116 -0.26%
PropBndChkMissedIter: 344328 343546 -782 -0.23%
PropEqualOrNotCallCount: 294827 294826 -1 0.00%
PropEqualOrNotMissedCount: 275857 275856 -1 0.00%
PropEqualOrNotMissedIter: 1301740 1301739 -1 0.00%
PropEqualZeroCallCount: 741463 741456 -7 0.00%
PropEqualZeroMissedCount: 741052 741045 -7 0.00%
PropEqualZeroMissedIter: 3785718 3785711 -7 0.00%
PropLclVarCallCount: 8686514 7010713 -1675801 -19.29%
PropLclVarMissedCount: 8300379 6624578 -1675801 -20.19%
PropLclVarMissedIter: 35950996 31782991 -4168005 -11.59%
SubRangeCallCount: 255571 122810 -132761 -51.95%
SubRangeMissedCount: 250068 117307 -132761 -53.09%
SubRangeMissedIter: 1079732 433215 -646517 -59.88%
Grand Total 126889858 118445809 -8444049 -6.65%

Asp

Metrics Main PR Diff Diff %
NoNullCallCount: 364032 362798 -1234 -0.34%
NoNullMissedCount: 114676 113442 -1234 -1.08%
NoNullMissedIter: 430855 428532 -2323 -0.54%
PropBndChkCallCount: 16880 16816 -64 -0.38%
PropBndChkMissedCount: 12908 12844 -64 -0.50%
PropBndChkMissedIter: 90483 90192 -291 -0.32%
PropEqualZeroCallCount: 241334 241333 -1 0.00%
PropEqualZeroMissedCount: 241250 241249 -1 0.00%
PropEqualZeroMissedIter: 1176971 1176970 -1 0.00%
PropLclVarCallCount: 2005365 1812875 -192490 -9.60%
PropLclVarMissedCount: 1911628 1719138 -192490 -10.07%
PropLclVarMissedIter: 8011006 7560579 -450427 -5.62%
SubRangeCallCount: 71947 37891 -34056 -47.33%
SubRangeMissedCount: 69099 35043 -34056 -49.29%
SubRangeMissedIter: 277427 136446 -140981 -50.82%
Grand Total 34326677 33276964 -1049713 -3.06%
Author: kunalspathak
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@JulieLeeMSFT JulieLeeMSFT modified the milestones: 7.0.0, 8.0.0 Aug 1, 2022
@kunalspathak
Copy link
Member Author

Ping. now that main is open for 8.0

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM.

I think you should wait until we have a new SPMI collection and then rebase/re-trigger PR testing to ensure no diffs and that testing is recent.

@kunalspathak
Copy link
Member Author

No diffs as expected and the replay/diff failures are fixed in #74095 .

@kunalspathak kunalspathak merged commit a33c21e into dotnet:main Aug 18, 2022
@kunalspathak kunalspathak deleted the shortcircuit branch August 18, 2022 17:57
@ghost ghost locked as resolved and limited conversation to collaborators Sep 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants