Subj : Re: Win32 Threads vs pthread performance To : comp.os.ms-windows.programmer.win32,comp.programming.threads From : David Schwartz Date : Tue Jan 25 2005 05:08 pm "Sten Westerback" wrote in message news:%hWAd.33637$k4.646476@news1.nokia.com... > Some code would be nice to see what you are doing. Off hand i > would suspect something like busy-looping in main thread, unefficient > time measurement method or too low priorities. Having many more > threads that CPU's in Windows will also cause lots of more taskswitches > and you could consider using fibers in some cases. Two other possibilities: 1) You may be using thread synchronization functions that are very similar to the ones provided by POSIX. This means a fast implementation on UNIX while slow emulation on WIN32. 2) You may have code whose performance is very critically dependant upon precise details of the timing of thread functions. For example, it may work a lot better with thread pre-emption when a mutex is released than without or vice-versa. This is *very* common in 'toy' code and less common in 'real' code. DS .