Creating an array of random numbers in Swift is slow

There are two pitches that would address this:

The later also has an implementation that you could use with some tweaks:
https://github.com/swiftlang/swift/pull/63511/files

1 Like