Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use Apple's CCRandomGenerateBytes in GetCryptographicallySecureRandomBytes#51526

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jkotas merged 1 commit intodotnet:mainfromvcsjones:guid-perf
Apr 21, 2021

Conversation

@vcsjones
Copy link
Member

@vcsjonesvcsjones commentedApr 19, 2021
edited
Loading

The Apple API offers significant performance improvements (an order of magnitude) over reading from /dev/urandom.

Closes#50897

BenchmarkDotNet=v0.12.1.20210419-develop, OS=macOS Big Sur 11.2.3 (20D91) [Darwin 20.3.0]
Intel Core i7-8700B CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET SDK=6.0.100-preview.3.21202.5
[Host] : .NET 6.0.0 (6.0.21.20104), X64 RyuJIT
Job-JBYKHU : .NET 6.0.0 (42.42.42.42424), X64 RyuJIT
Job-LIKOBM : .NET 6.0.0 (42.42.42.42424), X64 RyuJIT

MethodJobToolchainMeanErrorStdDevRatioGen 0Gen 1Gen 2Allocated
NewGuidJob-JBYKHUbranch76.92 ns1.553 ns1.376 ns0.12----
NewGuidJob-LIKOBMmain @ccc47f5615.33 ns9.879 ns9.241 ns1.00----

Benchmark code is available athttps://github.com/vcsjones/DotNetCryptoBenches/blob/610b5b2c9865e9fa27b7834ce0dcd0666d776e4d/src/RngBench.cs

/cc@GrabYourPitchforks@jkotas

danmoseley reacted with hooray emoji
…Bytes.The Apple API offers significant performance improvements (an order of a magnitude) overreading from /dev/urandom.
@ghost
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly onearea label.

Copy link
Member

@stephentoubstephentoub left a comment

Choose a reason for hiding this comment

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

Nice.

Copy link
Member

@jkotasjkotas left a comment

Choose a reason for hiding this comment

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

Looks great. Thank you!

@ghost
Copy link

Hello@jkotas!

Because this pull request has theauto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn morehere.

@vcsjones
Copy link
MemberAuthor

I think the build is wedged.

@jkotas
Copy link
Member

This does not affect browser, ignoring runtime-staging Browser leg.

@jkotasjkotas merged commit81f6bf3 intodotnet:mainApr 21, 2021
@vcsjonesvcsjones deleted the guid-perf branchApril 21, 2021 01:34
@karelzkarelz added this to the6.0.0 milestoneMay 20, 2021
@ghostghost locked asresolvedand limited conversation to collaboratorsJun 19, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@stephentoubstephentoubstephentoub left review comments

@jkotasjkotasjkotas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.0.0

Development

Successfully merging this pull request may close these issues.

Guid.CreateNew() has regressed a lot on macOS

6 participants

@vcsjones@jkotas@stephentoub@jeffhandley@karelz@danmoseley

[8]ページ先頭

©2009-2025 Movatter.jp