Files
swift-nio/Sources
Johannes Weiss d6be946626 ByteBuffer: one fewer allocs to go to Data (#1839)
Motivation:

When getting a `Data` from a `ByteBuffer` we currently allocate twice
(`__DataStorage`) and the closure for `Data.Deallocator`.

Modifications:

We can optimise that by making the closure capture exactly one
`AnyObject` which is already a reference counted object. The compiler
realises that (on Linux) and saves us an alloc.

Thanks @lukasa for the suggestion here:
https://github.com/apple/swift-nio/pull/1836#issuecomment-830044155

Result:

Fewer allocs.
2024-11-26 11:36:30 +00:00
..
2024-01-16 03:30:26 -08:00
2024-09-12 13:18:25 +01:00
2024-09-12 13:18:25 +01:00