This document discusses method dispatching in Swift. It explains that method dispatch determines which method is invoked in response to a message. In C++ and Objective-C, methods can use static or dynamic dispatch. Static dispatch is determined at compile-time, while dynamic dispatch is determined at runtime. The document also shows how Swift can generate Objective-C classes and use the runtime, with Swift classes being Objective-C classes under the hood. It demonstrates through benchmarks that Swift code can be as fast or faster than equivalent Objective-C code.
Related topics: