[erlang-questions] Closures vs apply

Bjorn Gustavsson bjorn@REDACTED
Mon Jul 23 11:29:28 CEST 2007


"Ben Hood" <0x6e6562@REDACTED> writes:

> Interesting. Are there any descriptions or explainations about the
> internals of function invocation that explain where these differences
> arise from?

A funs contains a pointer to the code (actually, a pointer to a struct
which itself contains a pointer to the code), while apply/3 must look up
the pointer to the code in a hash table.

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list