For typical cases (small mostly ASCII strings) CompactString::from_utf8_lossy(s) is significantly (~10x) slower than CompactString::from(String::from_utf8_lossy(s))
Thanks for the reporting the issue! From what I remember the implementation was ported from the stdlib, although I don't think much time has been spent making sure it's as performant, I'll have to dive in here.
For typical cases (small mostly ASCII strings)
CompactString::from_utf8_lossy(s)
is significantly (~10x) slower thanCompactString::from(String::from_utf8_lossy(s))