Avatar
Differentiable の方でも KeyPath の高速化に取り組んでいるらしく (Forums より) て,ランタイム側の変更だけでも割と速くなるみたいですね. https://github.com/apple/swift/pull/60758 (edited)
The main assumption associated with this performance improvement is that any contiguous region of (KeyPathComponentKind) structs is trivially-typed, and as such, can be traversed via simple pointer...
4:52 PM
64 倍高速化されたテストケースを覗いてみたら今日のスライドの序盤で 34 倍遅い例として出てたシンプルな使い方と似てました. https://github.com/apple/swift/blob/730bf2403582f35e85a13045416f7a761d0552d2/benchmark/single-source/KeyPathPerformanceTests.swift#L1548 (edited)
The Swift Programming Language. Contribute to apple/swift development by creating an account on GitHub.
👀 2