]> git.lizzy.rs Git - rust.git/commit
Avoid repeated interning of static strings.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 2 May 2019 10:34:26 +0000 (20:34 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Thu, 2 May 2019 10:47:20 +0000 (20:47 +1000)
commit6ef39e69eac42e1cc86ec8eeb1b85c6b3a8784fa
tree2ae27dc2fd60df15ec3c7361e4bcdefdefcb57ee
parent03122e1bac482b150844ef9664b1ad2438b43072
Avoid repeated interning of static strings.

`file_metadata_raw` interns the strings `"<unknown>"` and `""` very
frequently. This commit avoids that, which reduces the number of symbols
interned significantly and reduces instruction counts by up to 0.5% on
some workloads.
src/librustc_codegen_llvm/debuginfo/metadata.rs
src/librustc_codegen_llvm/debuginfo/mod.rs