|
-
April 17th, 2008, 07:24 PM
#1
multiple thread is slower???
Hi, All,
I tried to use multiple thread to speed up. Unfortunately, it becomes about 10% slower if I add one more thread, although exactly the same code is used in both cases.
I am sure my computer has two dual-core CPU's and my code is compiled with option multi-thread DLL. The only reason why it slows down, which I can think of, is that all threads are using the same CPU although there are four CPU's. Does anyone know how to test that instead of look at CPU performance?
I don't have any lock or mutex in my code, but four thread reads the same vector through iterator. Will that be a problem?
Besides this, is there any other reason that can cause mutiple thread to be slower?
Thanks,
CR
Last edited by caperover2002; April 17th, 2008 at 07:53 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|