Skip to content

Instantly share code, notes, and snippets.

View xavipedrals's full-sized avatar

Xavier Pedrals Camprubí xavipedrals

View GitHub Profile
{
"meta":{
"id":"f2a749b8-746d-4e8d-b877-93bc1392801c",
"created":"2018-10-19T12:33:28.056Z",
"updated":"2018-10-24T10:44:13.468Z"
},
"data":{
"family_name":null,
"given_name":null,
"middle_name":null,
import XCTest
class ArrayVSSetTest: XCTestCase {
//Creation times are practically the same (keeping in mind a set is created from an array)
func testSetCreationPerformance() {
let array = [Int](1...10000)
self.measure {
for _ in 0...100 {
_ = Set(array)