Files
swift-nio/Sources
Cory Benfield abf2b35e6d Remove implicit ByteBuffer copy in copyMemory (#2330)
Motivation:

withVeryUnsafeBytes has a reference to `self` that it is using. This
necessarily triggers a copy when we subsequently use `self` inside the
block. The effect of that copy is an extra retain/release pair, and a
call to beginAccess, that we simply don't need.

Modifications:

Replace the call to `_setBytesAssumingUniqueBufferAccess` with a
manually inlined equivalent.

Result:

Avoids the extra copy of `self`, removes a retain/release and a
beginAccess.
2022-12-12 11:58:23 +00:00
..
2022-11-09 11:02:45 +00:00
2021-01-22 18:39:10 +00:00
2022-12-01 15:35:04 +01:00