[erlang-questions] Anonymous functions and performance

Filipe David Manana fdmanana@REDACTED
Tue Nov 1 18:02:14 CET 2011

Is there any difference, regarding performance/efficiency, between the
2 following calls:


F = fun(A, B) -> myfun(A, B) end,
F(foo, bar).


F = fun mymodule:myfun/2,
F(foo, bar).

I've heard about the later being more efficient, but haven't been able
to measure it (using timer:tc/3). Or is this part of the eight myths
(http://www.erlang.org/doc/efficiency_guide/myths.html) ?


Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

More information about the erlang-questions mailing list