From: Adrien G. <aj....@gm...> - 2008-03-21 19:55:58
|
The part that puzzled me was how multiple atomic operations could cause performance bottlenecks. As for priority queues by their nature having internal dependencies which prohibit efficient concurrent behavior, it's quite possible. I am currently devoting some effort to the study of efficient parallel containers. I haven't searched for texts on the subject yet, rather I am waiting for my multi-core programming books from Intel Press to understand more about what the containers should look like and how they should behave for good performance. Once I understand what I'm looking for, I will attempt to design some better behaved containers, and perhaps understand the TBB containers better. AJ On Fri, Mar 21, 2008 at 3:22 PM, Reed, Robert W <rob...@in...> wrote: > I'm not sure I agree, Adrien. Publishing bad code doesn't necessarily > provide any lessons to the reader. If there was a demonstration of how to > avoid the shoals of bad code provided in such a release, there'd be a > positive lesson there. If the answer is that priority queues by their very > nature have too many internal dependencies to permit concurrent thread > access, then you might have to accept that priority queue accesses are > serial events. You put a global lock around your STL priority queue and try > to minimize the use of it. The only reason I could see for wanting such > failed implementations is the expectation that you could do better. > Personally I don't see the value there. > > _______________________________________________________________________ > > Robert Reed Rob...@in... > > Intel SSG/ Developer Products Division/ Performance, Analysis and > > Threading Lab/ Technical Consulting > > Dept. JF1-15, 2111 NE 25th Ave phone 503-264-9624 > > Hillsboro, OR 97124 mobile 503-830-1530 fax 503-264-9227 > > > > Imagine the Creator as a low comedian, and at once the world becomes > > explicable. > > --H.L. Mencken > > ________________________________________________________________________ > ------------------------------ > > *From:* tbb...@li... [mailto: > tbb...@li...] *On Behalf Of *Adrien Guillon > *Sent:* Friday, March 21, 2008 8:36 AM > *To:* for people interested in developing TBB itself > *Subject:* [Tbb-develop] TBB Priority Queue > > > > It was mentioned on the forums that a TBB priority queue was implemented > before, but that the performance was horrible due to many atomic operations. > > Could we have this code made public so that we can learn from your > mistakes without making them ourselves? > > AJ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Tbb-develop mailing list > Tbb...@li... > https://lists.sourceforge.net/lists/listinfo/tbb-develop > > |