mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: Many network protocols (especially for example NFS) have quite a number of integer values next to each other. In NIO, you'd normally parse/write them with multiple read/writeInteger calls. Unfortunately, that's a bit wasteful because we're checking the bounds as well as the CoW state every time. Modifications: - Provide read/writeMultipleIntegers for up to 15 FixedWidthIntegers. - Benchmarks Result: Faster code. For 10 UInt32s, this is a 5x performance win on my machine, see benchmarks.