diff options
| author | bors <bors@rust-lang.org> | 2018-07-29 09:33:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-29 09:33:37 +0000 |
| commit | 023fd7e74a9eb5bafcb75fcbe69b7110e9de4492 (patch) | |
| tree | c9b50228b27509d45f6d73e33aaec6b482c80c36 /src/liballoc_jemalloc | |
| parent | a5c2d0fffaaf0b764c01bc4066e51ffd475ceae9 (diff) | |
| parent | 57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa (diff) | |
| download | rust-023fd7e74a9eb5bafcb75fcbe69b7110e9de4492.tar.gz rust-023fd7e74a9eb5bafcb75fcbe69b7110e9de4492.zip | |
Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkov
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions
