[PATCH] D54418: [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace SetVector with custom BitVectorVector

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 12 13:09:41 PST 2018


MaskRay added a comment.

In https://reviews.llvm.org/D54418#1296028, @lebedev.ri wrote:

> In https://reviews.llvm.org/D54418#1296001, @MaskRay wrote:
>
> > In https://reviews.llvm.org/D54418#1295942, @lebedev.ri wrote:
> >
> > > In https://reviews.llvm.org/D54418#1295941, @MaskRay wrote:
> > >
> > > > I'm also not following...
> > >
> > >
> > > I'm sorry that i'm not following what you do not follow :)
> > >
> > > > DBSCAN is a BFS/Dijkstra-like algorithm. a `BitVector` + reserved `std::vector` suffice.
> > >
> > > Which is exactly what this `BitVectorVector` implements, as far as i can tell.
> > >  I do not understand what the question is. I'm sorry. Can you reformulate the question, please?
> >
> >
> > Maybe I should quote "talk is cheap" here... My idea is https://reviews.llvm.org/D54442 (I hope it won't interfere your other improvement)
>
>
> I still do not understand what the question is.
>  Yes, that pretty much the same as this code.
> Differences:
>
> - uses pop back, instead of pop front. my measurements so far always showed pop back to be worse.
> - Both data structures are inline, instead of abstracting them under BitVectorVector.
> - One very interesting point - initial insertion is a special case, no need to check in the set. I do expect that to be faster, let's see..


Can you suggest some way to get the large benchmark file as you have in `/tmp/benchmarks.yaml`? I need to experiment with it but it is still unclear to me why `pop_back` is slower.


Repository:
  rL LLVM

https://reviews.llvm.org/D54418





More information about the llvm-commits mailing list