4 ms·
"While the language should allow for great performance, the current compiler is still a bit rough, and I've had a hard time getting Swift to come out ahead in a
by dmurdoch 12y ago
"While the language should allow for great performance, the current compiler is still a bit rough, and I've had a hard time getting Swift to come out ahead in any performance tests. Most of the slowness looks to come down to a lot of redundant retain/release activity being emitted by the compiler. I expect this to be fixed before too long, but in the meantime, it means that this article is going to be more about how Swift could potentially be faster than Objective-C than about how it's actually faster right now."
Well that is very much in-line with what the SO page is saying, lots of retain release operations.
" I did not try to understand all of it, but the most suspicious parts are 13 invocations of "callq _swift_retain" and another 13 invocations of "callq _swift_release". That is, 26 subroutine calls in the inner loop!"
- adamnemecek 12y agoThe main difference is that Swift unlike obj-c can be made fast.