Funs behaving differently after native compilation

Richard Carlsson richardc@REDACTED
Thu Jan 12 17:38:15 CET 2006


Joel Reymont wrote:
> I worked around this by calling apply(Module, ...). Apparently {M, F}
> is deprecated.

Don't do that. Calling apply is generally much more inefficient,
since it must traverse a list to push arguments on the stack.
Unless your argument lists really vary in length (and then you
should stop and ask yourself what the heck you are doing...),
it is both faster and cleaner to just do Module:Function(...).

	/Richard




More information about the erlang-questions mailing list