[PATCH] D54381: [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): use llvm::SetVector<> instead of ILLEGAL std::unordered_set<>

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 11 16:45:42 PST 2018


MaskRay requested changes to this revision.
MaskRay added a comment.
This revision now requires changes to proceed.

When used to cluster points (measurements) this way with DBSCAN, the order how points are processed does not matter. (But I would feel slightly better if the result is deterministic, i.e. `tools/llvm-exegesis/lib/Analysis.cpp#L199` should sort `PointIndices` first).

I actually think a bitset (to track if an element has been inserted) + pre-allocated vector (of size of the number of points) is the best. They will be even faster than a `DenseSet<size_t>`.


Repository:
  rL LLVM

https://reviews.llvm.org/D54381





More information about the llvm-commits mailing list