It uses threads to do very little amount of work: 4 * math.pow(-1, k) / (2*k + 1) ... creating a thread is a very heavy weight operation, while doing little math is really easy. So most of the time is spent doing thread bookkeeping. Your computation needs to justify running it in a thread ... which this does not as its just an example for parallel not an efficient implementation.
- Parallel example for computing pi efficiently is actually slow onde
- Re: Parallel example for computing pi efficiently is actual... miran
- Re: Parallel example for computing pi efficiently is ac... Yardanico
- Re: Parallel example for computing pi efficiently i... onde
- Re: Parallel example for computing pi efficient... xflywind
- Re: Parallel example for computing pi effi... treeform