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

initial cut at guarded devirt perf tests #174

Merged
merged 5 commits into from
Dec 12, 2018

Conversation

AndyAyersMS
Copy link
Member

I can see these are getting compiled but they don't show up in listing or filtering.

So not sure what I'm doing wrong.

@adamsitnik can you take a look?

@AndyAyersMS
Copy link
Member Author

This more or less reproduces the first couple of graphs in the guarded devirtualization writeup, which I measured in a more ad-hoc fashion.

Perf for the "really bad guess" case (pB = 0) shows a somewhat higher relative loss, but the crossover point is for GDV still somewhere between 0.0 and 0.1....

Method testInput no GDV GDV
Call2 pB = 0.00 1.894 ns 2.321 ns
Call2 pB = 0.10 3.191 ns 2.797 ns
Call2 pB = 0.20 4.036 ns 2.836 ns
Call2 pB = 0.30 4.950 ns 2.731 ns
Call2 pB = 0.40 6.032 ns 2.490 ns
Call2 pB = 0.50 6.381 ns 2.305 ns
Call2 pB = 0.60 5.382 ns 1.964 ns
Call2 pB = 0.70 5.146 ns 1.886 ns
Call2 pB = 0.80 3.735 ns 2.442 ns
Call2 pB = 0.90 2.854 ns 1.900 ns
Call2 pB = 1.00 1.888 ns 0.893 ns

I have similar tests for interface calls that I'll work on converting over. Measuring interface call impact is a bit trickier because VSD has some residual state and so we can't use the same call site for different test inputs.

@AndyAyersMS AndyAyersMS changed the title [WIP] initial cut at guarded devirt perf tests initial cut at guarded devirt perf tests Dec 7, 2018
@AndyAyersMS
Copy link
Member Author

Added the interface versions. Simpler than I thought as BDN seems to run each case in its own process so there is no VSD carryover (one can tell by looking at the no GDV two class results, they will not be symmetric about p=0.5 if VSD is carrying state over from the previous input array).

Interface results:

Method testInput noGDV GDV
Call2 pB = 0.00 2.480 ns 2.8002 ns
Call2 pB = 0.10 4.602 ns 3.2773 ns
Call2 pB = 0.20 6.162 ns 2.9830 ns
Call2 pB = 0.30 7.262 ns 2.8617 ns
Call2 pB = 0.40 8.396 ns 2.7793 ns
Call2 pB = 0.50 8.705 ns 2.3494 ns
Call2 pB = 0.60 8.726 ns 2.1261 ns
Call2 pB = 0.70 7.557 ns 1.9230 ns
Call2 pB = 0.80 5.930 ns 1.7155 ns
Call2 pB = 0.90 4.482 ns 1.5456 ns
Call2 pB = 1.00 2.466 ns 0.7914 ns

@AndyAyersMS
Copy link
Member Author

@adamsitnik think these are ready

some renaming and pedantic refactor
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for contributing new benchmarks to the perf repo!

@adamsitnik adamsitnik merged commit acf4742 into dotnet:master Dec 12, 2018
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.

2 participants