I’ve been dealing with an example of just what you described: Unicode normalization and collation. There’s a good normalization library in Rust—in terms of the quality of the code, standards conformance, how comfortable I am depending on it, etc.—but it’s a full order of magnitude slower than icu4c.[0] Which shouldn’t come as a surprise! Some of these things take decades.
Recently, I looked at some string functions in the Rust stdlib and noticed it is full of unsafe code. With comments like "this writes ascii only, so we do not utf-8 validation"