Skip to content

Adding benchmarks for the new single/double math APIs #2540

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

Merged
merged 6 commits into from
Aug 4, 2022

Conversation

tannergooding
Copy link
Member

These benchmarks follow the existing pattern used for the other math tests. This pattern was setup to avoid noise and other issues that BDN currently has with such small/highly optimized functions (such as dotnet/BenchmarkDotNet#1802).

for (int iteration = 0; iteration < MathTests.Iterations; iteration++)
{
value += sinCosPiDelta;
// (float sinResult, float cosResult) = float.SinCosPi(value);
Copy link
Member Author

Choose a reason for hiding this comment

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

These functions should be updated to use the actual SinCosPi function once we move onto the next preview.

It is beneficial for them to exist beforehand to show the difference between calling individually vs the helper that reduces overall logic.

Copy link
Member

@DrewScoggins DrewScoggins left a comment

Choose a reason for hiding this comment

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

LGTM

@tannergooding tannergooding merged commit 32ca06e into dotnet:main Aug 4, 2022
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