> Look, I wrote " But the point is that the exact same external library code has a _lower_ cost if called [from C]" and that remains a true statement.
I don't think you've understood the article at all.
The overhead came from the author's own abstractions that were designed to accommodate both the assembly version or the Rust fallback. The assumption was that they take the same types and therefore the abstraction would be zero-cost, but in practice the Rust version had different types and therefore there was extra overhead in the way they were called.
If the author had simply done an extern "C" of the function and called it from Rust there wouldn't be overhead.
> To me, that looks like a high-cost non-abstraction.
The abstractions that caused this probably were not standard Rust library abstractions. The author wrote them as part of the library.
You don't need an abstraction at all to just call C functions from Rust. It's build right into the language.
If you think the problems in this article are a common Rust failure mode, you haven't understood the article at all. The unique method of calling C functions was something the author wrote, not a standard Rust practice.