Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » multi-threading slower than single thread
Re: multi-threading slower than single thread [message #24792 is a reply to message #24788] Sat, 30 January 2010 08:48 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
nixnixnix wrote on Fri, 29 January 2010 16:23

Hi,

I have a very strange thing happening. Just over 1 year ago I wrote some multi-threading code that scaled the performance of my calculation linearly with number of virtual cores. However, now that same code performs worse than a single thread.

Using my SVN I have stepped back in time one year and recompiled that code and it performs as I remember it.

My code now is many many times slower and the single threaded version performs better than the multithreaded version.



Generally, this is a sign that either synchronization costs or thread management costs are higher than gains of using multiple cores....

Hard to comment more withou seeing the code.

When you are speaking about svn, are you speaking about U++ (then it would be useful to at least provide svn revision which appears to break it) or your code?

Quote:


(size?) of the exe that is causing it to perform hundreds of times worse.



Not really impossible. Can be a cache issue. But IMO unlikely.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Linux MT problems with time functions
Next Topic: Why ie cannt catch messages from keyboard and mouse
Goto Forum:
  


Current Time: Sat May 11 06:42:39 CEST 2024

Total time taken to generate the page: 0.02393 seconds