News for hackers. Stuff that matters.
Re:Apple’s Use of Swift in iOS 13 by jchb on Thursday September 26, 2019 @08:52PM (#21087405)
> - Message passing in ObjC is so optimized that it probably can't get much faster, and anyone acting like it's slow has a potentially skewed understanding of this

The problem with Objc message passing is not the absolute execution time involved in passing a message. The problem is that the dynamism involved completely disables the compiler from performing any code-inlining. Typically inlining small functions is what enables the compiler to unlock further optimisations. From simple things such as merging duplicate loads from same address, to auto-vectorization.

Re:Apple’s Use of Swift in iOS 13 by Klonoar on Thursday September 26, 2019 @11:16PM (#21088090)
Consider the following: the smoothest UI/UX platform of the past decade has been iOS, which was pretty much built on ObjC.

These types of speedups just aren't necessary in that world. You'd drop to C or C++ if you needed it, which is trading convenience for complexity.

You could want it to be faster, but it's not going to materially show itself in common workloads.

Re:Apple’s Use of Swift in iOS 13 by coliveira on Thursday September 26, 2019 @10:27PM (#21087868)
If you need this level of optimization you can always use pure C functions, which is exactly why Objective-C was created as a C extension.
Re:Apple’s Use of Swift in iOS 13 by kccqzy on Friday September 27, 2019 @12:01AM (#21088297)
If you want inlining don't use message passing. Just define your function as if you were writing C. Simple. Use message passing when you need the dynamism.