From: Mark Simulacrum Date: Fri, 19 May 2017 20:16:17 +0000 (-0600) Subject: Rollup merge of #42037 - nagisa:charpat, r=sfackler X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=db01c945fc96fa5f2d68dbd73d75a282a07576b5;p=rust.git Rollup merge of #42037 - nagisa:charpat, r=sfackler Minor optimisation of the string operations The interesting benchmarks are
(<100% → better than original ) Delta Original ns/i This Patch ns/i
str::contains_bang_char::long_lorem_ipsum 24.98% 5565 1390
str::contains_bang_char::short_ascii 27.78% 144 40
str::contains_bang_char::short_mixed 33.33% 120 40
str::contains_bang_char::short_pile_of_poo 59.42% 69 41
str::ends_with_ascii_char::long_lorem_ipsum 45.26% 5457 2470
str::ends_with_ascii_char::short_ascii 45.01% 5486 2469
str::ends_with_ascii_char::short_mixed 46.31% 5452 2525
str::ends_with_ascii_char::short_pile_of_poo 45.34% 5443 2468
str::ends_with_unichar::long_lorem_ipsum 45.94% 5466 2511
str::ends_with_unichar::short_ascii 46.06% 5456 2513
str::ends_with_unichar::short_mixed 45.50% 5486 2496
str::ends_with_unichar::short_pile_of_poo 45.65% 5448 2487
str::find_underscore_char::long_lorem_ipsum 62.21% 5567 3463
str::find_underscore_char::short_ascii 66.44% 146 97
str::find_underscore_char::short_mixed 76.23% 122 93
str::find_underscore_str::short_pile_of_poo 47.62% 252 120
str::find_zzz_char::long_lorem_ipsum 62.17% 5569 3462
str::find_zzz_char::short_ascii 66.67% 147 98
str::find_zzz_char::short_mixed 75.41% 122 92
str::find_zzz_str::long_lorem_ipsum 72.86% 925 674
str::rfind_underscore_char::long_lorem_ipsum 34.19% 7128 2437
str::rfind_underscore_char::short_ascii 37.31% 193 72
str::rfind_underscore_char::short_mixed 41.42% 169 70
str::rfind_underscore_char::short_pile_of_poo 50.51% 99 50
str::rfind_zzz_char::long_lorem_ipsum 34.20% 7129 2438
str::rfind_zzz_char::short_ascii 37.11% 194 72
str::rfind_zzz_char::short_mixed 40.94% 171 70
str::rfind_zzz_char::short_pile_of_poo 54.81% 104 57
str::trim_right_ascii_char::short_mixed 110.42% 48 53
string::bench_from 117.24% 58 68
string::bench_from_str 117.24% 58 68
string::bench_push_str 111.11% 54 60
string::bench_to_string 112.07% 58 65
string::from_utf8_lossy_100_invalid 111.31% 1529 1702
--- db01c945fc96fa5f2d68dbd73d75a282a07576b5