You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Random performance can be improved on Apple platforms by bit-shifting two UInt32 from arc4random versus a more expensive arc4random_buf. It is unclear how to best make this change considering ABI stability.
To root implementation is contained within swift/stdlib/public/stubs/Random.cpp. Other relevant files are swift/stdlib/public/SwiftShims/LibcShims.h and swift/stdlib/public/core/Random.swift.
The text was updated successfully, but these errors were encountered:
If this is the case, it's a bug to be fixed in the OS, not something that we should be hacking around in Swift. robp (JIRA User) what hardware and OS version are you observing this on? I haven't been able to reproduce it in initial testing.
Doing a little bit of archaeology, I believe that this may have been fixed in the OS in iOS 13.0 / macOS 10.15, etc, which would explain why I'm not seeing a problem in my tests.
Attachment: Download
Additional Detail from JIRA
md5: 053d86c49d7db04030d5556413da9124
Issue Description:
Random performance can be improved on Apple platforms by bit-shifting two UInt32 from arc4random versus a more expensive arc4random_buf. It is unclear how to best make this change considering ABI stability.
To root implementation is contained within swift/stdlib/public/stubs/Random.cpp. Other relevant files are swift/stdlib/public/SwiftShims/LibcShims.h and swift/stdlib/public/core/Random.swift.
The text was updated successfully, but these errors were encountered: