[llvm-commits] Fwd: Patch for review: Speeding up ScheduleDAG computations

Dan Gohman gohman at apple.com
Mon Mar 3 14:24:38 PST 2008


On Mar 3, 2008, at 1:31 PM, Chris Lattner wrote:

> On Mar 3, 2008, at 1:26 PM, Evan Cheng wrote:
>> Thanks.
>>
>> Using std::set<> makes me queasy. :-) Too bad it doesn't seem  
>> possible
>> to use SmallPtrSet (elements are not in sorted order).
>
> I'm sad to say that std::set is probably the best thing we have right
> now that provides priority queue + removal from the middle support.
>
> Does anyone know of a better data structure to implement these
> operations?  Even if you don't volunteer to implement it, we can add
> it to the open projects page.

There's make_heap/push_heap/etc. in <algorithm> that let a
plain std::vector (or a SmallVector I guess) be used as a heap.

Dan
  



More information about the llvm-commits mailing list