Re: thread, multiprocessing: communication overhead

2008-12-30 Thread Duncan Booth
mk wrote: >> CMIIW, but I believe your timing function includes the time to launch >> the actual processes and threads, create the synch. objects, etc. You >> might try it again, creating them first, starting the timer, then >> loading them. > > Except I don't know how to do that using timeit.T

Re: thread, multiprocessing: communication overhead

2008-12-30 Thread Duncan Booth
mk wrote: > This time I decided to test communication overhead in multithreaded / > multiprocess communication. The results are rather disappointing, that > is, communication overhead seems to be very high. In each of the > following functions, I send 10,000 numbers to the function / 10 thread

Re: thread, multiprocessing: communication overhead

2008-12-30 Thread mk
Aaron Brady wrote: snips def threadsemfun(): sem = threading.Semaphore() def threadlockfun(): sem = threading.Semaphore() You used a Semaphore for both lock objects here. Right... I corrected that (simply changed to threading.Lock() in threadlockfun) and the result is muc

Re: thread, multiprocessing: communication overhead

2008-12-30 Thread Aaron Brady
On Dec 30, 9:46 am, mk wrote: > Hello everyone, > > This time I decided to test communication overhead in multithreaded / > multiprocess communication. The results are rather disappointing, that > is, communication overhead seems to be very high. In each of the > following functions, I send 10,000

thread, multiprocessing: communication overhead

2008-12-30 Thread mk
Hello everyone, This time I decided to test communication overhead in multithreaded / multiprocess communication. The results are rather disappointing, that is, communication overhead seems to be very high. In each of the following functions, I send 10,000 numbers to the function / 10 threads