It's been a while so let's update / correct this thread's infos one last time, hopefully.
The bold texts are the TL;DRs.
swift-endpoint
As an extended response to @Joannis_Orlandos 's question, I'd say that was essentially "skill issue" as @RandomHashTags likes to say
.
swift-endpoint now easily beats the C library inet APIs in all cases. Depending on your usage the benefits can be marginal, or 10+x. See swift-endpoint's README Performance section. A lot of time went into putting comprehensive benchmarks together, and the benchmarks are only an under-representation of swift-endpoint's performance against the C APIs for a Swift user.
I can now say that swift-endpoint is overkill in terms of performance, but that comes with no downsides to users of the library. Just that I spent too much time on the library and effectively tried out every single trick I could put together or find on the internet.
It was mostly to satisfy my curiosity and see how far I can get.
Namely, I did go through "Checking the assemblies" (and more, like occasionally checking SIL, although SIL is higher level than assembly but it has its own [dis/]advantages).
I also tried a bunch of SIMD / SWAR / speculative-write tricks. Few of the SIMD / SWAR tricks made it into the library to make it as fast as it is. Speculative writes were usually a win. For IPv4 such tricks won't pay off since IPv4 length is too small, but for IPv6 they did. For example as a result the IPv6 to-string serialization is not only faster, but also essentially branchless.
swift-idna
See swift-idna's README Performance section. We now have benchmarks to prove that swift-idna does beat ICU.
This is also only made possible by a few more "tricks". For example, and also just off the top of my head, I had to put together a "stack-or-spill-to-heap" "Small/TinyArray" type and I hope I can properly decouple it from the project to swift-tiny-sequence.
I think I can do a few more optimizations in swift-idna as well but not sure if I'll find the time.
What happened to the "standard network address types" idea?
See Announcing the Networking Workgroup, the new Networking Workgroup is interested in the idea so we'll see where we'll get with this.