 public func run_RandomDoubleDef(_ N: Int) {
   for _ in 0 ..< N {
     var x = 0.0
-    for _ in 0 ..< 100_000 {
+    for _ in 0 ..< 1_000 {
       x += Double.random(in: -1000...1000)
     }
     blackHole(x)

//

public let RandomValues = [
  BenchmarkInfo(name: "RandomIntegersDef", runFunction: run_RandomIntegersDef, tags: [.api]),
  BenchmarkInfo(name: "RandomIntegersLCG", runFunction: run_RandomIntegersLCG, tags: [.api]),
  BenchmarkInfo(name: "RandomDoubleDef", runFunction: run_RandomDoubleDef, tags: [.api]),
  BenchmarkInfo(name: "RandomDoubleLCG", runFunction: run_RandomDoubleLCG, tags: [.api]),
]

/// A linear congruential PRNG.
struct LCRNG: RandomNumberGenerator {
  private var state: UInt64
  
  init(seed: Int) {
    state = UInt64(truncatingIfNeeded: seed)
    for _ in 0..<10 { _ = next() }
  }
  
  mutating func next() -> UInt64 {
    state = 2862933555777941757 &* state &+ 3037000493
    return state

public func run_RandomIntegersDef(_ N: Int) {
  for _ in 0 ..< N {
    var x = 0
    for _ in 0 ..< 1_000 {
      x &+= Int.random(in: 0...10_000)
    }
    blackHole(x)
