|
|
|
|
|
by toth
3688 days ago
|
|
The function call is not being optimized out, it's being hoisted outside the loop. I.e., it is as if the code was written as: let result = flatuseStruct(outputData)
for _ in 0..<iterations {
assert(result == 8644311667)
total = total + UInt64(result)
}
The counter will still be correct, but you are not measuring what you think you are measuring. |
|
Changed the iteration to:
now result is around 43msThanks for pointing it out. Have to check if there are so other things involved, but that might be it.