Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Adding some basic Utf8Formatter/Utf8Parser perf tests covering decimal, double, and float #33427

Merged
merged 2 commits into from
Nov 12, 2018
Merged

Adding some basic Utf8Formatter/Utf8Parser perf tests covering decimal, double, and float #33427

merged 2 commits into from
Nov 12, 2018

Conversation

tannergooding
Copy link
Member

CC. @stephentoub, @GrabYourPitchforks

These just mirror the Utf16Parser/Utf16Formatter perf tests for these types.

[InlineData(2.71828182845904524)] // Positive e
[InlineData(3.14159265358979324)] // Positive pi
[InlineData(double.MaxValue)] // Max Positive Normal
[InlineData(double.PositiveInfinity)] // Positive Infinity
Copy link
Member

Choose a reason for hiding this comment

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

Do all of these have sufficiently different code paths / specializations that they're all worth running? I think @adamsitnik was trying to cull the number of variations for a given perf test down to some small set, but I don't know exactly what the criteria he was using was. Maybe we need to split things inner/outer loop, or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. This is covering each of the special input kinds for floating-point numbers:

  • Zero (positive and negative)
  • Infinity
  • NaN
  • Normal
  • Subnormal

For the categories, we are then testing specific numbers that are known to be handled differently (either because they produce/consume additional digits, or they fall outside the normal input range and hit the slow path).

@tannergooding tannergooding merged commit 811e41a into dotnet:master Nov 12, 2018
@karelz karelz added this to the 3.0 milestone Nov 15, 2018
jlennox pushed a commit to jlennox/corefx that referenced this pull request Dec 16, 2018
…l, double, and float (dotnet#33427)

* Adding some basic Utf8Formatter/Utf8Parser perf tests covering decimal, double, and float

* Changing the inner iteration count to use the `InnerCount` constant
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…l, double, and float (dotnet/corefx#33427)

* Adding some basic Utf8Formatter/Utf8Parser perf tests covering decimal, double, and float

* Changing the inner iteration count to use the `InnerCount` constant


Commit migrated from dotnet/corefx@811e41a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants