diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-06-28 11:30:27 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-06-29 11:37:12 +1000 |
| commit | de1914af342bbd1f20388f52d6ea342420de6fc0 (patch) | |
| tree | ccf1c03356fda6f50436fecdf49a9baf8ced6dc5 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 45fcd1d0c5df8287a3ffe620fa41b4ab478bc323 (diff) | |
| download | rust-de1914af342bbd1f20388f52d6ea342420de6fc0.tar.gz rust-de1914af342bbd1f20388f52d6ea342420de6fc0.zip | |
Avoid an unnecessary use of `SmallStr`.
I don't know why `SmallStr` was used here; some ad hoc profiling showed this code is not that hot, the string is usually empty, and when it's not empty it's usually very short. However, the use of a `SmallStr<1024>` does result in 1024 byte `memcpy` call on each execution, which shows up when I do `memcpy` profiling. So using a normal string makes the code both simpler and very slightly faster.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
