4 ms·
Nothing 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 yo
by jakobegger 8y ago
Nothing 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)