in reply to
Re: threads: work crew memory leak
in thread threads: work crew memory leak
An app that creates 100,000 threads in 15 minutes, each to handle 1 number, is really badly designed. Like building a new train for every journey to work. Inefficient and unsustainable.
In general (and in the specific case) I agree with you, however, threads are alot less useful on today's platforms due to their high overhead.
The idea of creating a separate thread for each instance of a non-progressive (each successive loop not dependent on previous) forloop to do each calculation on independent terms is horribly limited by the high overhead of threads.
Conceivably, EVEN a single addition of 100,000 variables on a 100,000 processor system could have a 100,000X speedup if thread creation overhead was 0.
Such a large gap between theory and practice...*sigh*....