[all-commits] [llvm/llvm-project] b9b9a2: [ProfData] Improve efficiency of reader (#169730)

Max via All-commits all-commits at lists.llvm.org
Mon Dec 1 12:22:31 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9b9a239df4785b42b050b128eff18694871bc14
      https://github.com/llvm/llvm-project/commit/b9b9a239df4785b42b050b128eff18694871bc14
  Author: Max <628527+mxms0 at users.noreply.github.com>
  Date:   2025-12-01 (Mon, 01 Dec 2025)

  Changed paths:
    M llvm/include/llvm/ProfileData/SampleProf.h
    M llvm/lib/ProfileData/SampleProf.cpp

  Log Message:
  -----------
  [ProfData] Improve efficiency of reader (#169730)

Pre-reserve space in the map before inserting. In release builds, 9.4%
of all CPU time is spent in llvm::sampleprof::ProfileSymbolList::add. Of
that 9.4%, roughly half is in llvm::DenseMapBase::grow.

---------

Co-authored-by: mxms <mxms at google.com>
Co-authored-by: Vitaly Buka <vitalybuka at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list