   print("Debug: \(DEBUG)")
 }
 
+var MAX_CONCURRENCY:Int = CONCURRENCY
+
+// Separate data for each thread
+var DATAS:[Data] = [Data]()
+for i in 1...MAX_CONCURRENCY {
+  var d = Data(String(data: DATA, encoding: .utf8)!.utf8)
+  DATAS.append(d)
+}
+
 // Create a queue to run blocks in parallel
 let queue = DispatchQueue(label: "hello", attributes: .concurrent)
 let group = DispatchGroup()

func code(block: Int, loops: Int) -> () -> Void {
return {
  var string: String?
  if METHOD == 1 {
    for _ in 1...EFFORT {
      string = String(data: DATA, encoding: .utf8)!
    }
  } else if METHOD == 2 {
    for _ in 1...EFFORT {
      string = makeString(data: DATA)
    }
  } else {
    for _ in 1...EFFORT {
      string = makeStringB(data: DATA)
    }

  }

_ = group.wait(timeout: .distantFuture) // allow final blocks to finish
if DEBUG { print("Warmup complete") }

for c in 1...MAX_CONCURRENCY {
CONCURRENCY = c
completeLoops = 0
RUNNING = true
