[PATCH] D149322: [llvm-profdata] Condense string allocations for MD5 function names

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 01:08:12 PDT 2023


huangjd created this revision.
huangjd added reviewers: davidxl, kazu, xur, snehasish, wenlei.
Herald added a subscriber: hiraditya.
Herald added a project: All.
huangjd requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Allocate a big buffer enough to hold all MD5 strings, instead of allocating it on heap one by one.
Also materialize all MD5 strings if the full profile is being read since all these strings are generated anyways.

Improved around 3% speed on loading an ExtBinary profile with 1GB total size/10 million names.

This refactoring takes precendence over the refactoring of using MD5 as key


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149322

Files:
  llvm/include/llvm/ProfileData/SampleProfReader.h
  llvm/lib/ProfileData/SampleProfReader.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149322.517475.patch
Type: text/x-patch
Size: 5863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230427/fc8edc70/attachment.bin>


More information about the llvm-commits mailing list