Hi Jochen, On Wed, Apr 2, 2008 at 9:59 PM, Jochen Theodorou <[EMAIL PROTECTED]> wrote: > why? If I have 1 CPU and two threads, each of them running t seconds, > shouldn't the time then be 2*t? Everything over 2*t would be the thread > handling overhead. since you let 1 Thread run n iteration taking time t > and then 2 Threads with n/2 iterations... shouldn't the total time then > still be t?
This particular example under discussion has a total number of iterations, and it tries to reach that number either via single thread, or two threads, etc. So, amount of work is roughly the same. What varies is the way the work done. The point is that with two treads on two-CPU system, the work should be done faster, because there are two cores running things in parallel. But with JDK6 this does not happen, both cores *ARE* 100% busy, but the time it takes to reach the end (to reach the total number of iterations limit) is longer than expected. Thanks, --Vladimir --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
