Random data generation in Swift
String.UTF16Index
conformances to RandomInRange
and RandomInClosedRange
String.UTF16Index
conformances to RandomInRange
and RandomInClosedRange
for Swift 3.2 and after
Strideable
, which the type no longer conforms to as of Swift 3.2Trivial
protocol public, allowing for library users to enable related optimizations for their own typesjump(count:)
variant of jump()
to Xoroshiro
and XorshiftStar
jump()
for XorshiftStar
20%+ fasterreseed(with:)
for ChaCha
550%+ faster
init(seed:)
is also faster due to reliance on reseed(with:)
RandomRetrievable
and RandomRetrievableInRange
protocols (see 793e473e4a7d21a6777f131c5bf47fc6f0907f73)SeedableFromSequence
protocol (see 71094375cee72f99a6cadd1f1195c5dba6369da1)random(using:)
method that applied to all Sequence
typesDouble
random(within:using:)
for TimeInterval
rangesRandomWithinRange
and RandomWithinClosedRange
to RandomInRange
and RandomInClosedRange
respectively
within:
argument now use in:
SeedableFromRandomGenerator
no longer requires Seedable
ChaCha.Seed
to [UInt32]
Xoroshiro
jump methodChaCha
reseed(with:)
did not generate the same values for the same seed it was instantiated withreseed()
method to SeedableFromOtherRandomGenerator
Array
initializers 5-10% faster