As it was suggested in D54381, Set is not the optimal data structure, given the data knowledge.
We know that the values are in range [0, Points_.size()).
Thus, we really only need a single bit to track whether we have the value or not.
Naturally, BitVector fits the bill.
We can't just use BitVector as a Set in SetVector, thus i have copied SetVector
into llvm-exegesis directory, pruned everything that isn't needed, and replaced Set with BitVector terminology.
Old: (D54415)
Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (16 runs): 6564.110422 task-clock (msec) # 1.000 CPUs utilized ( +- 0.19% ) ... 6.5657 +- 0.0129 seconds time elapsed ( +- 0.20% )
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' (16 runs): 5553.640326 task-clock (msec) # 1.000 CPUs utilized ( +- 0.27% ) ... 5.5545 +- 0.0148 seconds time elapsed ( +- 0.27% )
So another -15%.