Files
rust/src/liballoc
kennytm 46d629a1d7 Rollup merge of #48657 - sinkuu:opt_str_repeat, r=dtolnay
Optimize str::repeat

Improves the performance of `str::repeat` by bulk copying. Here is the benchmarks of `"abcde".repeat(n)`:

|`n`|old [ns/iter]|new [ns/iter]|diff [%]|
---|---|---|---
|1|27.205|27.421|+0.794|
|2|27.500|27.516|+0.0581|
|3|27.923|27.648|-0.985|
|4|31.206|30.145|-3.40|
|5|35.144|31.861|-9.34|
|7|43.131|34.621|-19.7|
|10|54.945|36.203|-34.1|
|100|428.31|52.895|-87.7|
2018-03-06 20:52:28 +08:00
..
2018-02-25 14:24:24 +08:00
2018-02-22 20:12:38 -05:00
2017-11-08 20:41:17 -08:00
2018-03-02 18:12:22 +09:00
2017-11-21 15:33:45 +01:00
2017-06-30 08:34:53 -10:00
2018-02-22 20:12:38 -05:00
2018-03-04 09:43:29 +09:00