]> git.lizzy.rs Git - rust.git/commit
Avoid symbol interning in `file_metadata`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 6 May 2019 01:47:03 +0000 (11:47 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Mon, 20 May 2019 08:56:53 +0000 (18:56 +1000)
commitc5d94017569713c12a7e3d260cb4cd0a02b26372
tree7df7cdc63a9f1db64163458e4ebc8abc941c1bea
parent128b4c8035fc788b78157d4e1975cda0f25ce599
Avoid symbol interning in `file_metadata`.

This commit changes `created_files` so it uses strings directly as keys,
rather than symbols derived from the strings. This avoids the cost of
having to do the hash table lookups to produce the symbols from the
strings.

The commit also uses `entry` to avoid doing a repeated hash table lookup
(`get` + `insert`).

Note that PR #60467 improved this code somewhat; this is a further
improvement.
src/librustc_codegen_llvm/debuginfo/metadata.rs
src/librustc_codegen_llvm/debuginfo/mod.rs