News for hackers. Stuff that matters.
Re:My misalignment with Apple's love affair with Swift by mpweiher on Monday June 11, 2018 @02:15AM (#17282200)
> performance, Swift is faster than Objective C

No it's not.

> because of the static type checking, which is a good thing

That's a reason why you think it should be faster. Actual performance is measured, not argued.

When you actually measure Swift, it is horribly slow.

UPDATE: details in other posts here. In general, my measurements have found Swift code to be 50% to 50x slower.

Re:My misalignment with Apple's love affair with Swift by archagon on Monday June 11, 2018 @08:43PM (#17289862)
I've found it to only be slower in Debug, not Release builds. Release is often significantly faster than the equivalent ObjC, and only a tiny bit slower than native C.
Re:My misalignment with Apple's love affair with Swift by mpweiher on Wednesday June 13, 2018 @05:41AM (#17301614)
Hmmm...you do realize that Objective-C is a full superset of C, so "Objective-C vs. native C" is not a distinction that makes sense?

If you are comparing primitive types in Swift with objects in Objective-C, then you are comparing apples to oranges. You need to compare objects in Swift with objects in Objective-C and primitive types in Swift with primitive types in Objective-C.

Rephrasing, my findings are similar:

Swift in debug mode is so incredibly slow that even using primitive types with Swift is slower than Objective-C objects. In release mode, it approaches, but rarely reaches native Objective-C speed.

More details here:

http://blog.metaobject.com/2014/09/no-virginia-swift-is-not-...