[LLVMdev] set_intersect and Visual C compiler

Alkis Evlogimenos alkis at cs.uiuc.edu
Tue Oct 12 11:53:59 PDT 2004


On Tuesday 12 October 2004 14:01, Chris Lattner wrote:
> Okay, it's pretty simple.  Given two sets (e.g. std::set), it walks
> through one of them.  For each element in the set it checks to see if the
> other contains the element.  if not it removes it.

This is a N log(M) algorithm. Why don't we use the set_intersection algorithm 
which runs in N+M time?

-- 

Alkis




More information about the llvm-dev mailing list