Skip to content
Unverified Commit 991154d0 authored by Krzysztof Pszeniczny's avatar Krzysztof Pszeniczny Committed by GitHub
Browse files

[LTO] Use .at instead of .lookup to avoid copies. (NFC) (#117888)

`DenseMap::lookup` returns by value (because it default-creates the
returned value if the key isn't present in the map), which means that we
do a lot of copying here. Since we assert that something is present in
the returned value two lines below this call, it's safe to use `.at`
here instead.

Copying and then destroying dense maps here is responsible for 60% of
the time spent in LTO indexing in a large internal build.
parent c29e895a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment