[PATCH] D54389: [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace std::vector<> with std::deque<> in llvm::SetVector<>

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 11 01:16:35 PST 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn.
Herald added a subscriber: tschuett.
lebedev.ri added a dependency: D54388: [llvm-exegesis] InstructionBenchmarkClustering::rangeQuery(): use llvm::SmallVector<size_t, 0> for storage..

Old: (https://reviews.llvm.org/D54388)

   Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
  
         8606.323981      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.11% )
  ...
             8.60773 +- 0.00978 seconds time elapsed  ( +-  0.11% )

New:

   Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
  
         7971.403653      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.14% )
  ...
              7.9728 +- 0.0113 seconds time elapsed  ( +-  0.14% )

Another -~7%.


Repository:
  rL LLVM

https://reviews.llvm.org/D54389

Files:
  tools/llvm-exegesis/lib/Clustering.cpp


Index: tools/llvm-exegesis/lib/Clustering.cpp
===================================================================
--- tools/llvm-exegesis/lib/Clustering.cpp
+++ tools/llvm-exegesis/lib/Clustering.cpp
@@ -121,7 +121,7 @@
     CurrentCluster.PointIndices.push_back(P);
 
     // Process P's neighbors.
-    llvm::SetVector<size_t> ToProcess;
+    llvm::SetVector<size_t, std::deque<size_t>> ToProcess;
     ToProcess.insert(Neighbors.begin(), Neighbors.end());
     while (!ToProcess.empty()) {
       // Retrieve a point from the set.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54389.173547.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181111/f381637b/attachment.bin>


More information about the llvm-commits mailing list