I investigated performance of String::from_str_in. Turns out that even after String::push_str is optimized (#229), the compiler does not figure out that bounds checks and various calculations can be elided.
So this change makes from_str_in about 18% faster for small strings.
PR includes a benchmark to demonstrate this.
Built on top of #229. If you're willing to merge, please merge that one first.
I investigated performance of
String::from_str_in
. Turns out that even afterString::push_str
is optimized (#229), the compiler does not figure out that bounds checks and various calculations can be elided.So this change makes
from_str_in
about 18% faster for small strings.PR includes a benchmark to demonstrate this.
Built on top of #229. If you're willing to merge, please merge that one first.
Sorry for sudden barrage of issues and PRs!