     name: "DictionaryKeysContainsNative",
     runFunction: run_DictionaryKeysContains,
     tags: [.validation, .api, .Dictionary],
-    setUpFunction: setup_DictionaryKeysContainsNative,
-    tearDownFunction: teardown_DictionaryKeysContains,
+    setUpFunction: setupNativeDictionary,
+    tearDownFunction: teardownDictionary,
     unsupportedPlatforms: [.linux]),
 ]
 #endif
 
 private var dictionary: [NSString: NSString]!
 
-private func setup_DictionaryKeysContainsNative() {
+private func setupNativeDictionary() {
 #if os(Linux)
   fatalError("Unsupported benchmark")
 #else
-  let keyValuePairs = (1...1_000_000).map {
-    ("\($0)" as NSString, "\($0)" as NSString)
+  let keyValuePair: (Int) -> (NSString, NSString) = {
+    let n = "\($0)" as NSString; return (n, n)
   }
-  dictionary = [NSString: NSString](uniqueKeysWithValues: keyValuePairs)
+  dictionary = [NSString: NSString](uniqueKeysWithValues:
+    (1...10_000).lazy.map(keyValuePair))
 #endif
 }
 
 #if _runtime(_ObjC)
-private func setup_DictionaryKeysContainsCocoa() {
-  let keyValuePairs = (1...1_000_000).map {
-    ("\($0)" as NSString, "\($0)" as NSString)
-  }
-  let nativeDictionary = [NSString: NSString](
-    uniqueKeysWithValues: keyValuePairs)
-  dictionary = (NSDictionary(dictionary: nativeDictionary)
-    as! [NSString: NSString])
+private func setupBridgedDictionary() {
+  setupNativeDictionary()
+  dictionary = (NSDictionary(dictionary: dictionary) as! [NSString: NSString])
 }
 #endif
 
-private func teardown_DictionaryKeysContains() {
+private func teardownDictionary() {
   dictionary = nil
 }
 

  }
#endif
}


    name: "DictionaryKeysContainsNative",
    runFunction: run_DictionaryKeysContains,
    tags: [.validation, .api, .Dictionary],
    setUpFunction: setupNativeDictionary,
    tearDownFunction: teardownDictionary,
    unsupportedPlatforms: [.linux]),
  BenchmarkInfo(
    name: "DictionaryKeysContainsCocoa",
    runFunction: run_DictionaryKeysContains,
    tags: [.validation, .api, .Dictionary],
    setUpFunction: setupBridgedDictionary,
    tearDownFunction: teardownDictionary),
]
#else
public let DictionaryKeysContains = [
