diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-06 16:25:35 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-06 20:52:28 +0800 |
| commit | 46d629a1d7e2fea805499ab11b9797340dc8e696 (patch) | |
| tree | 32b3f16e49ea1e3d5195e8876948766fc6cc31c6 /src/rustllvm/RustWrapper.cpp | |
| parent | 6b8984dfc8fe0882c21b723cc96f31fb72b62e38 (diff) | |
| parent | 3d58543d49266a7ec3eb5f5f2ffaf902fce17c53 (diff) | |
| download | rust-46d629a1d7e2fea805499ab11b9797340dc8e696.tar.gz rust-46d629a1d7e2fea805499ab11b9797340dc8e696.zip | |
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|
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
