[erlang-questions] Anonymous functions and performance

Ahmed Omar <>
Tue Nov 1 20:26:15 CET 2011


You are right about the test, i didn't consider it.

On Tue, Nov 1, 2011 at 6:38 PM, Filipe David Manana <>wrote:

> 33> F1 = fun lists:sort/1.
> > #Fun<lists.sort.1>
> > 34> F = fun(A)-> lists:sort(A) end.
> > #Fun<erl_eval.6.80247286>
> > 35> F1 = fun lists:sort/1.
> > #Fun<lists.sort.1>
> > 36> timer:tc(erlang, apply, [F, [[2,3,5,1,10,9,8]]]).
> > {11,[1,2,3,5,8,9,10]}
> > 37> timer:tc(erlang, apply, [F1, [[2,3,5,1,10,9,8]]]).
> > {4,[1,2,3,5,8,9,10]}
>



-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111101/a15df099/attachment.html>


More information about the erlang-questions mailing list