Skip to content

Conversation

@MineCake147E
Copy link
Contributor

Comparing performance difference of dotnet/runtime#81632.

@MineCake147E

This comment was marked as off-topic.

@MineCake147E

This comment was marked as resolved.

@danmoseley danmoseley requested a review from tannergooding May 21, 2023 22:14
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, thank you for your contribution @MineCake147E!

Comment on lines +10 to +12

using BenchmarkDotNet.Attributes;

Copy link
Member

Choose a reason for hiding this comment

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

nit: empty lines

Suggested change
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes;

Comment on lines +22 to +31
BitConverter.UInt16BitsToHalf(0x03ff), //Maximum subnormal number in Half
(Half)12345.0f /* same value used by other tests to compare the perf */,
BitConverter.UInt16BitsToHalf(0x7dff) //NaN
};

public static IEnumerable<float> SingleValues => new float[]
{
6.097555E-05f,
12345.0f /* same value used by other tests to compare the perf */,
65520.0f, //Minimum value that is infinity in Half
Copy link
Member

Choose a reason for hiding this comment

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

nit: inconsistent comments

Suggested change
BitConverter.UInt16BitsToHalf(0x03ff), //Maximum subnormal number in Half
(Half)12345.0f /* same value used by other tests to compare the perf */,
BitConverter.UInt16BitsToHalf(0x7dff) //NaN
};
public static IEnumerable<float> SingleValues => new float[]
{
6.097555E-05f,
12345.0f /* same value used by other tests to compare the perf */,
65520.0f, //Minimum value that is infinity in Half
BitConverter.UInt16BitsToHalf(0x03ff), // Maximum subnormal number in Half
(Half)12345.0f, // same value used by other tests to compare the perf
BitConverter.UInt16BitsToHalf(0x7dff) // NaN
};
public static IEnumerable<float> SingleValues => new float[]
{
6.097555E-05f,
12345.0f, // same value used by other tests to compare the perf
65520.0f // Minimum value that is infinity in Half

@adamsitnik
Copy link
Member

For some reason I can not apply the suggestions, since they are just style nits I am going to merge the PR right now so we start collecting numbers before merging dotnet/runtime#81632

@adamsitnik adamsitnik merged commit 3fc45ff into dotnet:main Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants