mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: The compiler is better at optimising closures wrapped in nominal types than raw closures when used as generic parameters. CallbackList is used a lot and stores an optional closure as well as on optional array of closures. Wrapping these internally should save some allocations. Modifications: - Wrap the element stored in the `CallbackList`. Result: Fewer allocs --------- Co-authored-by: Cory Benfield <lukasa@apple.com>
826 B
826 B
Workarounds
The following list of PRs and commits were applied in order to work around bugs or cases where the Swift compiler was unable to sufficiently optimize the code:
- https://github.com/apple/swift-nio/pull/1374
- https://github.com/apple/swift-nio-ssl/pull/176
- https://github.com/apple/swift-nio/pull/1325
- https://github.com/apple/swift-nio/pull/1299
- https://github.com/apple/swift-nio/pull/1252
- https://github.com/apple/swift-nio/pull/494
- https://github.com/apple/swift-nio/pull/420
- https://github.com/apple/swift-nio/commit/abc963cfe1e1d4856c41421c9d53ea778102e9e8
- https://github.com/apple/swift-nio/pull/1814
- https://github.com/apple/swift-nio/pull/1956
- https://github.com/apple/swift-nio/pull/1961
- https://github.com/apple/swift-nio/pull/2046
- https://github.com/apple/swift-nio/pull/3303