mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation:
Calling `function(otherFunction)` allocates, but
`function({ otherFunction($0) }` does not.
See: SR-12115 and SR-12116.
Modifications:
Avoid passing functions directly; pass them in new closures instead.
Result:
Fewer allocations.
591 B
591 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