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

Port to 2.1 - Fix performance regression in Guid.NewGuid on OSX #29457

Merged
merged 1 commit into from
May 2, 2018

Conversation

janvorli
Copy link
Member

@janvorli janvorli commented May 2, 2018

We have recently removed dependency on the libuuid for Guid creation. Unfortunately,
while the perf on Linux has improved, we have not noticed that the perf on OSX
degraded 10 fold.

This change fixes it by modifying the implementation of the underlying
SystemNative_GetNonCryptographicallySecureRandomBytes to use arc4random
like the uuid_generate_random that we were using before the libuuid dependency
removal does.

Fixes https://github.com/dotnet/corefx/issues/29427

We have recently removed dependency on the libuuid for Guid creation. Unfortunately,
while the perf on Linux has improved, we have not noticed that the perf on OSX
degraded 10 fold.

This change fixes it by modifying the implementation of the underlying
SystemNative_GetNonCryptographicallySecureRandomBytes to use arc4random
like the uuid_generate_random that we were using before the libuuid dependency
removal does.
@janvorli janvorli added this to the 2.1.0 milestone May 2, 2018
@janvorli janvorli self-assigned this May 2, 2018
@stephentoub
Copy link
Member

OSX x64 Debug Build failure is https://github.com/dotnet/corefx/issues/27064 which was fixed in master with #29238.

@stephentoub stephentoub merged commit 6906dbf into dotnet:release/2.1 May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants