4 ms·
Sorry but this is completely false, Swift is certainly faster than ObjC. There are several WWDC talks, independent reviews, and the language designers themselve
by trevor-e 8y ago
Sorry but this is completely false, Swift is certainly faster than ObjC. There are several WWDC talks, independent reviews, and the language designers themselves supporting that.
In practice I agree it's easy to write code that's slow, but you can't knock the language itself for user error. They are still working on improving the user experience, such as how 4.2 will remove redundant generated retain/release calls. And hopefully they make the compiler smarter at figuring out which specialization functions to output for generics/protocols.
- Froyoh 8y agoThis is false, that is false, I don't know who to believe.
- Derbasti 8y agoSimple: Swift is clearly fast for some applications, but slow for others. It is not a silver bullet. There are no silver bullets.
- jakobegger 8y agoNothing the "language designers" claim can change the fact that I need to rewrite critical sections in ObjC. There is a subset of Swift that is fast. But if you tell people that Swift is faster than Obj C, they will think that they can rewrite code in Swift and it will be faster. That may be the case at some point in the future, but right now that's just not true yet. In my experience, the opposite is the case. Swift is a great language, it's safe, and nice to work with. But those bits where you are processing data in a tight loop -- you still may have to do that in Obj C. Obviously this depends a lot on your problem, but I have seen 2x speedups and more for things like string processing (rewriting things from Swift in Obj C) And as I said, that's without using the fancy parts in Swift (things like type erasure absolutely kill performance)