This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][DWARF] Replace MD5 with hash_combine
ClosedPublic

Authored by ayermolo on Jul 19 2023, 4:33 PM.

Details

Summary

Slight performance improvement, based on perf.

Collected on clang-17 built with DWARF4 + split dwarf.
MD5
8:46.50 real, 713.38 user, 64.19 sys, 0 amem, 41933136 mmem
8:27.44 real, 708.55 user, 63.83 sys, 0 amem, 41906576 mmem
8:40.37 real, 724.63 user, 62.56 sys, 0 amem, 42319572 mmem

hash_combine

8:03.99 real, 681.92 user, 60.04 sys, 0 amem, 42459204 mmem
8:02.92 real, 685.20 user, 62.56 sys, 0 amem, 41879164 mmem
7:57.85 real, 690.27 user, 60.12 sys, 0 amem, 41806240 mmem

Diff Detail

Event Timeline

ayermolo created this revision.Jul 19 2023, 4:33 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ayermolo requested review of this revision.Jul 19 2023, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2023, 4:33 PM
ayermolo retitled this revision from [BOLT][DWARF][NFC] Replace MD5 with hash_combine to [BOLT][DWARF] Replace MD5 with hash_combine.Jul 19 2023, 5:01 PM
ayermolo edited the summary of this revision. (Show Details)
ayermolo edited the summary of this revision. (Show Details)Jul 19 2023, 5:08 PM
Amir added a comment.Jul 19 2023, 8:22 PM

Is this hash strictly internal, or it gets emitted somewhere? What kind of hash is used by hash_combine?

Is this hash strictly internal, or it gets emitted somewhere? What kind of hash is used by hash_combine?

Yes, internally only.
No idea. Some kind of home brew in ADT/hashing.h + std::rotate.
FYI same API is used in BinarySection.cpp to has BinarySections, and in SplitFunctions.

maksfb accepted this revision.Jul 20 2023, 9:53 AM
This revision is now accepted and ready to land.Jul 20 2023, 9:53 AM
This revision was automatically updated to reflect the committed changes.