Are these calls to raw new? No special override to a custom allocator?
>> 100,000 threads is extreme! However, seems to get a "point" across. Try
>
> Nope, there are 100,000 tasks not a 100,000 threads; by default my
> thread pool creates N threads where N is number of CPU cores and I
> believe QThreadPool does the same.
100,000 async individual state-machines multiplexed by N threads is
workable, and can be scaleable.
>> to create some array hybrids before creating shi%loads of linked
>> data-structures where each node needs an explicit call to new under
>> the contention of a loaded system! Use clean ingredients to make the
>> damn sausages! Not a heap of ground up crap from a 1,000+ different
>> possibly diseased cows trying to compress together in a coherent package.
>
> Sorry I failed to parse/understand any of that.
Try to create a nice sized single allocation of properly aligned and
padded memory before any threads and/or tasks are created. This can help
reduce some calls to new during a tasks lifetime. The alignment and
padding can help get rid of false sharing.
>>> Not only is my thread pool class easier to use (lambdas instead of
>>> deriving of classes from QRunnable) it also appears to have
>>> significantly better performance.
>>>
>>> Game on for neoGFX being serious competition for Qt... :D
>>
>> Sounds good to me. :^)
>>
>> Sorry if my comments are misrepresenting you. ;^/
>
> Your comments are erroneous if that is what you mean.
Did I do any better in this message, or worse? Trying to understand why
you got your speed up. Better use of data-structures wrt alignment,
layout and logic?