Debunking The Expensive Exported-Function Call Myth

James Hague james.hague@REDACTED
Wed Mar 16 03:20:25 CET 2005


On 09 Mar 2005 17:51:29 +0100, Luke Gorrie <luke@REDACTED> wrote:
> 
> then the optimized version (using Core Erlang syntax for
> <Multiple,Values> in registers syntax) is something like:
> 
>   foo() -> <A, B> = bar(), ...code...
>   bar() -> <1, 2>.

Very cool!  I did not know about that!

I think I erred in providing the easiest possible example to shoot down :)

An alternate example is that you could determine the return type of a
local function via "type discovery," then propagate that information
to the calling function.  That is, if you knew a local function always
returned a list, then specialized code could be used to process that
value after it is returned.

James



More information about the erlang-questions mailing list