Skip to content

Commit f2a76a4

Browse files
committed
Add ChaCha benchmark to README.md
1 parent 9808a96 commit f2a76a4

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ let value = Int.random(using: &Xoroshiro.default)
194194

195195
- `XorshiftStar`
196196

197+
- `ChaCha`
198+
197199
#### SeedableRandomGenerator
198200

199201
`SeedableRandomGenerator` is for types that can be seeded with some associated
@@ -441,16 +443,17 @@ let unsafeRandoms = Array<Int>(unsafeRandomCount: 100, using: &randomGenerator)
441443

442444
##### Arrays Benchmark
443445

444-
A benchmark of generating 1000 random arrays of 10000 count:
445-
446-
| Generator | Safe (seconds) | Unsafe (seconds) |
447-
| ------------------------- | --------------------- | ----------------- |
448-
| `Xoroshiro` | 0.0948 | 0.0271 |
449-
| `Xorshift` | 0.1066 | 0.0568 |
450-
| `XorshiftStar` | 0.1028 | 0.0341 |
451-
| `MersenneTwister` | 0.1208 | 0.0432 |
452-
| `ARC4Random` | 1.0034 | 0.2416 |
453-
| `DeviceRandom` | 10.0906 | 5.3348 |
446+
A benchmark of generating 1000 random `Int` arrays of 10000 count:
447+
448+
| Generator | Time (in seconds) |
449+
| ------------------------- | ----------------- |
450+
| `Xoroshiro` | 0.0271 |
451+
| `Xorshift` | 0.0568 |
452+
| `XorshiftStar` | 0.0319 |
453+
| `ChaCha` | 0.2027 |
454+
| `MersenneTwister` | 0.0432 |
455+
| `ARC4Random` | 0.2416 |
456+
| `DeviceRandom` | 5.3348 |
454457

455458
**Note:** Results may vary due to various factors.
456459

0 commit comments

Comments
 (0)