[PATCH] D54445: [llvm-exegesis] BitVectorVector: provide assign() method, use it.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 12 23:51:36 PST 2018
lebedev.ri added a comment.
I will cut this patchseries here for now.
Old walltime was around ~25sec, new is ~5.6sec, so -77.58%.
5 patches remain in need of review:
- https://reviews.llvm.org/D54383 `[llvm-exegesis] Analysis: writeMeasurementValue(): don't alloc string for double each time.` <- self-contained, pretty trivial
- https://reviews.llvm.org/D54388 `[llvm-exegesis] InstructionBenchmarkClustering::rangeQuery(): use llvm::SmallVector<size_t, 0> for storage.` <- was essentially replaced by https://reviews.llvm.org/D54415, but that was only possible after https://reviews.llvm.org/D54390, so it kind-of makes sense as an intermediate step.
- Small incremental improvements to the `dbScan()`:
- https://reviews.llvm.org/D54381 `[llvm-exegesis] InstructionBenchmarkClustering::dbScan(): use llvm::SetVector<> instead of ILLEGAL std::unordered_set<>` <- very straight-forward replacement, nothing complicated
- https://reviews.llvm.org/D54418 `[llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace SetVector with custom BitVectorVector`
- https://reviews.llvm.org/D54445 `[llvm-exegesis] BitVectorVector: provide assign() method, use it.` <- trivial
The biggest remaining problem is within `isNeighbour`. It contains 99% of cache misses, due to that vector-within-vector storage.
I believe i will be able to get //some// improvement by
1. Precalculating (into `BitVector`) the `is neighbor` matrix. I actually already tried that, not much of an improvement, anoter 100ms i think, not worth it on it's own.
and
2. Parallelizing this computation. I have not *yet* tried this, but i'm **optimistic** about it.
Thanks!
Repository:
rL LLVM
https://reviews.llvm.org/D54445
More information about the llvm-commits
mailing list