Skip to content

Use FixedTimeEquals in NETCore targets #2857

Merged
westin-m merged 7 commits into
devfrom
westin/useFixedTimeEquals
Oct 10, 2024
Merged

Use FixedTimeEquals in NETCore targets #2857
westin-m merged 7 commits into
devfrom
westin/useFixedTimeEquals

Conversation

@westin-m

@westin-m westin-m commented Sep 30, 2024

Copy link
Copy Markdown
Contributor

Closes #2825

There is another class in wilson named CryptographicOperations, so the fully qualified name is necessary.

without FixedTimeEquals Mean Error StdDev
AreEqual_ByteArrays 31.59 ns 0.185 ns 0.155 ns
AreEqual_ByteSpans 30.66 ns 0.169 ns 0.141 ns
with FixedTimeEquals Mean Error StdDev
AreEqual_ByteArrays 150.2 ns 0.47 ns 0.44 ns
AreEqual_ByteSpans 160.1 ns 0.56 ns 0.52 ns

The following results are after applying NoOptimization

without FixedTimeEquals Mean Error StdDev
AreEqual_ByteArrays 173.8 ns 0.36 ns 0.33 ns
AreEqual_ByteSpans 154.4 ns 0.21 ns 0.19 ns
with FixedTimeEquals Mean Error StdDev
AreEqual_ByteArrays 157.8 ns 1.96 ns 1.83 ns
AreEqual_ByteSpans 155.4 ns 0.20 ns 0.19 ns

@westin-m
westin-m requested a review from a team as a code owner September 30, 2024 22:32
kllysng
kllysng previously approved these changes Sep 30, 2024
@pmaytak

pmaytak commented Sep 30, 2024

Copy link
Copy Markdown
Collaborator

Could you also run a small benchmark?

@keegan-caruso

Copy link
Copy Markdown
Contributor

A similar change is needed for the ReadOnlySpan overload.

@armandRobled

Copy link
Copy Markdown

Patche-2_Robledo6

@kllysng

kllysng commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

Could you also run a small benchmark?

Are we okay with these benchmarks? Not sure if the results are as expected 🤔

@kllysng
kllysng dismissed their stale review October 1, 2024 17:51

Benchmarks

@westin-m westin-m closed this Oct 2, 2024
@westin-m westin-m reopened this Oct 8, 2024
@westin-m

westin-m commented Oct 8, 2024

Copy link
Copy Markdown
Contributor Author

Reopening this because our current code is getting optimized, which we don't want.

@pmaytak pmaytak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Both of these methods are covered by tests?

@westin-m

westin-m commented Oct 8, 2024

Copy link
Copy Markdown
Contributor Author

Both of these methods are covered by tests?

Yes, there is already coverage.

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.

[Feature Request] Use fixedtimeequals on Net Core targets

7 participants