 print("JSONEncoder (Dict) took \(timeNanos / Double(iterations)) ns")
 
 timeNanos = benchmark {
-  jsonSerialization()
+  jsonSerialization_Dict()
 }
-print("JSONSerialization took \(timeNanos / Double(iterations)) ns")
+print("JSONSerialization (Dict) took \(timeNanos / Double(iterations)) ns")
+
+timeNanos = benchmark {
+  jsonSerialization_Array()
+}
+print("JSONSerialization (Array) took \(timeNanos / Double(iterations)) ns")
+

#else
import Glibc
#endif

let encoder = JSONEncoder()


let myDict: [String:Int] = ["int1": 1, "int2": 12, "int3": 123, "int4": 1234,
 "int5": 12345, "int6": 123456, "int7": 1234567, "int8": 12345678,
 "int9": 123456789, "int10": 1234567890]
let myArray: [Any] = ["int1", "int2", "int3", "int4", "int5", "int6", "int7", "int8", "int9", "int10", 1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 1234567890]
let iterations = 1000

func benchmark(_ work: () -> Void) -> Double {
    var start = timespec()
