On 3/5/10, Joe Martin <jm202 / yahoo.com> wrote:
> Robert Klemme wrote:
>> For this scenario a thread pool with fixed size seems sufficient.
>>
>
> Very good.  This works quite nicely as well.
>
> Just wondering, are there any performance benefits of using one method
> over the other?

Yes. Threads use memory (quite a lot of it, in fact). Mostly this goes
to the thread's stack. Limiting the number of threads saves quite a
bit of memory. I'm not sure there's any improvement in the amount of
cpu time either way, other than perhaps some fewer cache misses
resulting from using less memory.