3 ms·
For the empty loops, I'd be willing to be that the objc compiler is optimizing them away entirely. I suspect that the Swift compiler may not be that smart yet.
by ori_b 12y ago
For the empty loops, I'd be willing to be that the objc compiler is optimizing them away entirely. I suspect that the Swift compiler may not be that smart yet. There are plenty of times I've wanted to benchmark some C operation, looked at the generated assembly to figure out what is going on, and found that it was empty.
Without source, disassembly, and something that you can test for yourself, this benchmark is rather uninformative.