Boost logo

Boost :

Subject: Re: [boost] [threadpool] version 22 with default pool
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2009-03-08 18:36:16


Edouard A. wrote:

> template <typename RandomIterator, typename Pool>
> void rec_pivot_partition(RandomIterator first, RandomIterator last, Pool &
> p)
> {
> if (std::distance(first, last) > 1000)
> {
> RandomIterator pivot = pivot_partition(first, last);
> rec_pivot_partition(first, pivot, p);
> rec_pivot_partition(pivot, last, p);
> }

So you are doing all of the partitioning in the main thread, before
starting any other threads?

Have you profiled that?

> const difference_type block_size = 1000;

Have you benchmarked the effect of adjusting that?

If that is sufficiently large, the performance of the threadpool queue
(etc) will not matter as much.

I suggest that you also tweak your benchmarking so that it runs for a
*lot* longer than 30 milliseconds.

Phil.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk