> This assumes that the C code is already fully optimal, but it very obviously is not.
Yeah, there's a lot of crusty old C code out there which has fallen way behind in performance, but everyone still uses because it's proven to be robust by C standards and changing it would be tempting fate. There's a tension between performance and security which doesn't exist to nearly the same degree in Rust, which is why you get instances like this where zero-unsafe Rust can run circles around the canonical C library.
https://old.reddit.com/r/rust/comments/1ha7uyi/memorysafe_pn...