From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 12 Jul 2004 13:31:54 -0600 From: andrey mirtchovski To: 9fans@cse.psu.edu Subject: Re: [9fans] the Thread War In-Reply-To: <3363177410434d70d7debab1ad28e867@plan9.ucalgary.ca> Message-ID: References: <3363177410434d70d7debab1ad28e867@plan9.ucalgary.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Topicbox-Message-UUID: be00d162-eacd-11e9-9e20-41e7f4b1d025 > did 1000000 iterations in 1.998280 seconds > 500430 iterations/second > 0 misses with a simple change one can measure the same ping-pong between two processes, thus involving context switches and a few syscalls (btw, using unbuffered channels makes no difference): plan9% diff 9thread.c 9threadproc.c 42c42 < threadcreate(child, nil, 1024); /* could be even smaller? */ --- > proccreate(child, nil, 1024); /* could be even smaller? */ plan9% plan9% for (i in `{seq 1 10}) 9threadproc did 1000000 iterations in 7.200755 seconds 138874 iterations/second 0 misses did 1000000 iterations in 7.235651 seconds 138205 iterations/second 0 misses did 1000000 iterations in 7.181722 seconds 139242 iterations/second 0 misses did 1000000 iterations in 7.272081 seconds 137512 iterations/second 0 misses did 1000000 iterations in 7.249308 seconds 137944 iterations/second 0 misses did 1000000 iterations in 7.202701 seconds 138837 iterations/second 0 misses did 1000000 iterations in 7.173075 seconds 139410 iterations/second 0 misses did 1000000 iterations in 7.256470 seconds 137808 iterations/second 0 misses did 1000000 iterations in 7.523487 seconds 132917 iterations/second 0 misses did 1000000 iterations in 7.225779 seconds 138393 iterations/second 0 misses plan9%