Skip to content

Skip assertion list look ups where unnecessary - #73142

Merged
kunalspathak merged 7 commits into
dotnet:mainfrom
kunalspathak:shortcircuit
Aug 18, 2022
Merged

Skip assertion list look ups where unnecessary#73142
kunalspathak merged 7 commits into
dotnet:mainfrom
kunalspathak:shortcircuit

Conversation

@kunalspathak

Copy link
Copy Markdown
Contributor

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

MetricsMainPRDiffDiff %
NoNullCallCount:199981199341-640-0.32%
NoNullMissedCount:6017859538-640-1.06%
NoNullMissedIter:303178301984-1194-0.39%
PropBndChkCallCount:3404934019-30-0.09%
PropBndChkMissedCount:2486024830-30-0.12%
PropBndChkMissedIter:199594199421-173-0.09%
PropLclVarCallCount:20591071363307-695800-33.79%
PropLclVarMissedCount:19445061248706-695800-35.78%
PropLclVarMissedIter:86764496027084-2649365-30.54%
SubRangeCallCount:9600224802-71200-74.17%
SubRangeMissedCount:9477623576-71200-75.12%
SubRangeMissedIter:424824102679-322145-75.83%
Grand Total3007212225563905-4508217-14.99%

Libraries

MetricsMainPRDiffDiff %
NoNullCallCount:13103791307300-3079-0.23%
NoNullMissedCount:453249450170-3079-0.68%
NoNullMissedIter:19750111969804-5207-0.26%
PropBndChkCallCount:6308962973-116-0.18%
PropBndChkMissedCount:4530945193-116-0.26%
PropBndChkMissedIter:344328343546-782-0.23%
PropEqualOrNotCallCount:294827294826-10.00%
PropEqualOrNotMissedCount:275857275856-10.00%
PropEqualOrNotMissedIter:13017401301739-10.00%
PropEqualZeroCallCount:741463741456-70.00%
PropEqualZeroMissedCount:741052741045-70.00%
PropEqualZeroMissedIter:37857183785711-70.00%
PropLclVarCallCount:86865147010713-1675801-19.29%
PropLclVarMissedCount:83003796624578-1675801-20.19%
PropLclVarMissedIter:3595099631782991-4168005-11.59%
SubRangeCallCount:255571122810-132761-51.95%
SubRangeMissedCount:250068117307-132761-53.09%
SubRangeMissedIter:1079732433215-646517-59.88%
Grand Total126889858118445809-8444049-6.65%

Asp

MetricsMainPRDiffDiff %
NoNullCallCount:364032362798-1234-0.34%
NoNullMissedCount:114676113442-1234-1.08%
NoNullMissedIter:430855428532-2323-0.54%
PropBndChkCallCount:1688016816-64-0.38%
PropBndChkMissedCount:1290812844-64-0.50%
PropBndChkMissedIter:9048390192-291-0.32%
PropEqualZeroCallCount:241334241333-10.00%
PropEqualZeroMissedCount:241250241249-10.00%
PropEqualZeroMissedIter:11769711176970-10.00%
PropLclVarCallCount:20053651812875-192490-9.60%
PropLclVarMissedCount:19116281719138-192490-10.07%
PropLclVarMissedIter:80110067560579-450427-5.62%
SubRangeCallCount:7194737891-34056-47.33%
SubRangeMissedCount:6909935043-34056-49.29%
SubRangeMissedIter:277427136446-140981-50.82%
Grand Total3432667733276964-1049713-3.06%

@ghostghost 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
Copy Markdown
ContributorAuthor

@dotnet/jit-contrib

@ghost

ghost commented Aug 1, 2022

Copy link
Copy Markdown

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

MetricsMainPRDiffDiff %
NoNullCallCount:199981199341-640-0.32%
NoNullMissedCount:6017859538-640-1.06%
NoNullMissedIter:303178301984-1194-0.39%
PropBndChkCallCount:3404934019-30-0.09%
PropBndChkMissedCount:2486024830-30-0.12%
PropBndChkMissedIter:199594199421-173-0.09%
PropLclVarCallCount:20591071363307-695800-33.79%
PropLclVarMissedCount:19445061248706-695800-35.78%
PropLclVarMissedIter:86764496027084-2649365-30.54%
SubRangeCallCount:9600224802-71200-74.17%
SubRangeMissedCount:9477623576-71200-75.12%
SubRangeMissedIter:424824102679-322145-75.83%
Grand Total3007212225563905-4508217-14.99%

Libraries

MetricsMainPRDiffDiff %
NoNullCallCount:13103791307300-3079-0.23%
NoNullMissedCount:453249450170-3079-0.68%
NoNullMissedIter:19750111969804-5207-0.26%
PropBndChkCallCount:6308962973-116-0.18%
PropBndChkMissedCount:4530945193-116-0.26%
PropBndChkMissedIter:344328343546-782-0.23%
PropEqualOrNotCallCount:294827294826-10.00%
PropEqualOrNotMissedCount:275857275856-10.00%
PropEqualOrNotMissedIter:13017401301739-10.00%
PropEqualZeroCallCount:741463741456-70.00%
PropEqualZeroMissedCount:741052741045-70.00%
PropEqualZeroMissedIter:37857183785711-70.00%
PropLclVarCallCount:86865147010713-1675801-19.29%
PropLclVarMissedCount:83003796624578-1675801-20.19%
PropLclVarMissedIter:3595099631782991-4168005-11.59%
SubRangeCallCount:255571122810-132761-51.95%
SubRangeMissedCount:250068117307-132761-53.09%
SubRangeMissedIter:1079732433215-646517-59.88%
Grand Total126889858118445809-8444049-6.65%

Asp

MetricsMainPRDiffDiff %
NoNullCallCount:364032362798-1234-0.34%
NoNullMissedCount:114676113442-1234-1.08%
NoNullMissedIter:430855428532-2323-0.54%
PropBndChkCallCount:1688016816-64-0.38%
PropBndChkMissedCount:1290812844-64-0.50%
PropBndChkMissedIter:9048390192-291-0.32%
PropEqualZeroCallCount:241334241333-10.00%
PropEqualZeroMissedCount:241250241249-10.00%
PropEqualZeroMissedIter:11769711176970-10.00%
PropLclVarCallCount:20053651812875-192490-9.60%
PropLclVarMissedCount:19116281719138-192490-10.07%
PropLclVarMissedIter:80110067560579-450427-5.62%
SubRangeCallCount:7194737891-34056-47.33%
SubRangeMissedCount:6909935043-34056-49.29%
SubRangeMissedIter:277427136446-140981-50.82%
Grand Total3432667733276964-1049713-3.06%
Author:kunalspathak
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@JulieLeeMSFTJulieLeeMSFT modified the milestones: 7.0.0, 8.0.0Aug 1, 2022
@kunalspathak

Copy link
Copy Markdown
ContributorAuthor

Ping. now that main is open for 8.0

@BruceForstallBruceForstall left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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

@kunalspathak
kunalspathak merged commit a33c21e into dotnet:mainAug 18, 2022
@kunalspathak
kunalspathak deleted the shortcircuit branch August 18, 2022 17:57
@ghostghost locked as resolved and limited conversation to collaborators Sep 17, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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

@kunalspathak@BruceForstall@JulieLeeMSFT