Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Li-Bot
Created March 9, 2020 05:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Li-Bot/430e28d57502b63c913c3b794cf192a0 to your computer and use it in GitHub Desktop.
Save Li-Bot/430e28d57502b63c913c3b794cf192a0 to your computer and use it in GitHub Desktop.
let elementsCount = 10_000_000
let fahrenheit = Array(repeating: 0.0, count: elementsCount).map { _ -> Double in
return Double.random(in: 32.0 ... 113.0)
}
var fahrenheits = [[Double]]()
for _ in 0 ..< totalElements {
fahrenheits.append(Array(repeating: 0.0, count: 1).map { _ -> Double in
return Double.random(in: 32.0 ... 113.0)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment