<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Also making just one call in the test is so fast that the timing will be dominated by setting up the test and what is done inside the fun. In your case you should call the funs "many" times with a really trivial list. I would not expect there to be much different but I haven't measured.<br><br>Robert<br><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">You are right about the test, i didn't consider it.<br><br><div class="gmail_quote">On Tue, Nov 1, 2011 at 6:38 PM, Filipe David Manana <span dir="ltr"><<a href="mailto:fdmanana@apache.org" target="_blank">fdmanana@apache.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"> 33> F1 = fun lists:sort/1.<br>
> #Fun<lists.sort.1><br>
> 34> F = fun(A)-> lists:sort(A) end.<br>
> #Fun<erl_eval.<a href="tel:6.80247286" target="_blank">6.80247286</a>><br>
> 35> F1 = fun lists:sort/1.<br>
> #Fun<lists.sort.1><br>
> 36> timer:tc(erlang, apply, [F, [[2,3,5,1,10,9,8]]]).<br>
> {11,[1,2,3,5,8,9,10]}<br>
> 37> timer:tc(erlang, apply, [F1, [[2,3,5,1,10,9,8]]]).<br>
> {4,[1,2,3,5,8,9,10]}</div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br>- Ahmed Omar<div><a href="http://nl.linkedin.com/in/adiaa" target="_blank">http://nl.linkedin.com/in/adiaa</a></div>
<div>Follow me on twitter</div><div><a href="http://twitter.com/#%21/spawn_think" target="_blank">@spawn_think</a></div><br>
<br>_______________________________________________<br>erlang-questions mailing list<br>erlang-questions@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote><br></div></body></html>