, 2 min read
How smart is Swift with abstraction? A trivial experiment with protocols
4 thoughts on “How smart is Swift with abstraction? A trivial experiment with protocols”
, 2 min read
4 thoughts on “How smart is Swift with abstraction? A trivial experiment with protocols”
Rust version also inlines all the way to 800.
https://godbolt.org/g/2gw5Tj
That would have been my expectation, but thanks for checking!
Are you sure C would do that by default with two translation units?
Is LTO on by default?
That’s a fair point. In C and C++, you may end up with slower code.
Point is: Swift does well in this instance.