[llvm] r347201 - [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace std::vector<> with std::deque<> in llvm::SetVector<>
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 05:28:26 PST 2018
Author: lebedevri
Date: Mon Nov 19 05:28:26 2018
New Revision: 347201
URL: http://llvm.org/viewvc/llvm-project?rev=347201&view=rev
Log:
[llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace std::vector<> with std::deque<> in llvm::SetVector<>
Summary:
Old: (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%.
Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
Reviewed By: courbet, RKSimon
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D54389
Modified:
llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp
Modified: llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp?rev=347201&r1=347200&r2=347201&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp Mon Nov 19 05:28:26 2018
@@ -121,7 +121,7 @@ void InstructionBenchmarkClustering::dbS
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.
More information about the llvm-commits
mailing list