Speeding up protocol conformances in Swift - Noah Martin | SwiftLeeds 2024

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025
  • This talk is about the slowest operation in Swift: protocol conformance checks (myVar as? MyProtocol). We'll start by profiling some of the top apps on the App Store and observing that protocol conformances are some of the slowest operations.
    Then we'll look directly at the runtime source code to see why it's so slow. In recent OS versions it has been made much faster in special cases, but there are now many paths through the runtime that developers need to keep track of.
    We'll conclude by looking at some proposed solutions to speed this up that are being discussed on the Swift forums (forums.swift.o..., as well as methods I use to hook the runtime which speed it up without even waiting for anything to change in Swift. During this talk you will learn how to speed up your own apps, how to quickly debug performance issues, and how to read source code from the Swift runtime and dyld to have a detailed understanding of app performance.
    --
    Presented at SwiftLeeds 2024 by Noah Martin

Комментарии •