This is an archive of the discontinued LLVM Phabricator instance.

ms-pdb: Precompute deserialized symbols for pdb once and then use it in sort instead of doing it in the comparison function
ClosedPublic

Authored by alex.telishev on Aug 20 2017, 1:48 PM.

Details

Summary

computeAddrMap function calls std::stable_sort with a comparison function that computes deserialized symbols every time its called. In the result deserializeAs<PublicSym32> is called 20-30 times for every symbol. It's much faster to calculate it beforehand and pass pointer to it to the comparison function.

Diff Detail

Event Timeline

alex.telishev created this revision.Aug 20 2017, 1:48 PM
zturner edited edge metadata.Aug 21 2017, 12:44 PM

Looks ok to me but I'll defer to ruiu@ for the final word since I'm not as familiar with this area.

Err wait, you uploaded to the wrong patch. This was supposed to be the PDB patch :) That one looks good. Can you re-upload this to the ICF patch?

Oops, sorry. Re-uploaded it to the right patch

This revision was automatically updated to reflect the committed changes.