Files
swift-mirror/benchmark/single-source/IterateData.swift
Pavol Vaskovic 3ff92efdac [benchmark] Extract setup from IterateData
IterateData has setup overhead of 480 μs (10%).

There remained strange setup overhead after extracting the data into setUpFunction, because of of-by-one error in the main loop. It should be either: `for _ 1…10*N` or: `for _ 0..<10*N`. It’s error to use 0…m*N, because this will result in `m*N + 1` iterations that will be divided by N in the reported measurement. The extra iteration then manifests as a mysterious setup overhead!
2018-10-23 22:49:25 +02:00

1.0 KiB