Thanks Per, for pointing out the typo! <br>and you all right on time resolution side. After correcting the problem pointed above, it turns out that, time taken to pass message is indeed very small  and it is less than timer resolution (on my machine it is coming out to be average of 0.6 microseconds per message).<br>
<br>very impressive :) it does it very fast! <br><br>Now next stuff I wonder, will the time required to pass message depends on what is being passed through message? guess is that it should. Because on process boundaries the data is copied.... copying will take time which will depend on the data itself.<br>
<br>I will experiment on it further....<br><br>thanks all!<br><br>(Vikrant)<br><br><div class="gmail_quote">2009/4/2 Per Gustafsson <span dir="ltr"><<a href="mailto:perjgus@gmail.com">perjgus@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It's because you are dividing the measured time by N. Otherwise sending messages in Erlang would be very fast indeed (less than a clock cycle).<br>
<br>Per <br><br><div class="gmail_quote">2009/3/31 Vikrant <span dir="ltr"><<a href="mailto:vikrant.patil@gmail.com" target="_blank">vikrant.patil@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">even if timer resolution is the reason why we don't see the change in time, question remains same. why the change in time scales with M(number of messages) and NOT with N (number of processes + number of messages)!<br>


<br><div class="gmail_quote">2009/3/29 Carsten Schultz <span dir="ltr"><<a href="mailto:carsten@codimi.de" target="_blank">carsten@codimi.de</a>></span><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Vikrant schrieb:<br>
<div>><br>
> 26> tokenring:tokenring(10000,1).<br>
> Time required to pass message 10000 times=3.00000 (4.40000) microsecond<br>
> .ok<br>
> 27> tokenring:tokenring(20000,1).<br>
> Time required to pass message 20000 times=3.00000 (4.65000) microsecond<br>
> .ok<br>
> 28> tokenring:tokenring(30000,1).<br>
> Time required to pass message 30000 times=3.33333 (4.63333) microsecond<br>
> .ok<br>
><br>
> (time in bracket is system time and time outside bracket is user time in<br>
> microseconds.)<br>
><br>
> This is surprising to me! I expected that time required to pass token<br>
> along N processes should be proportional to N!<br>
<br>
</div>My guess here is that the resultion of the timer is 1/3.  So your<br>
results are 9, 9, 10.  Considering that these are rounded and that your<br>
function will have a constant term, these numbers are just to small to<br>
allow you to deduce much about your runtime function.  Change the second<br>
parameter into, say, 1000000 in all cases and see what happens.<br>
<font color="#888888"><br>
--<br>
Carsten Schultz (2:38, 33:47)<br>
<a href="http://carsten.codimi.de/%0APGP/GPG" target="_blank">http://carsten.codimi.de/<br>
PGP/GPG</a> key on the <a href="http://pgp.net" target="_blank">pgp.net</a> key servers,<br>
fingerprint on my home page.<br>
</font></blockquote></div></div><br>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>
</blockquote></div><br>