mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Motivation: When calling ByteBuffer setBytes/writeBytes with CircularBuffer<Uint8> we take the slow path. Before we make any changes we want a baseline for current performance. Modifications: - This gives a very significant performance increase for CircularBuffer and likely other types that use the slow path. - Adds ByteBuferBenchmark.swift and tests circular_buffer_into_byte_buffer_1kb, circular_buffer_into_byte_buffer_1mb. - Make _setSlowPath @inlinable - Implement == for CircularBuffer.Index to make it @inlinable Result: - Extra performance tests - Improve performance