[erlang-questions] is the compiler smart enough to ...
Zabrane Mickael
zabrane3@REDACTED
Sun Dec 25 21:15:19 CET 2011
Thanks Richard
Regards,
Zabrane
On Dec 25, 2011, at 6:00 AM, Richard Carlsson wrote:
> On 2011-12-25 17:03, Zabrane Mickael wrote:
>> Hi guys,
>>
>> Suppose this function:
>> foo(Bin) ->
>> Bin.
>>
>> Is the compiler smart enough to inline it without telling him explicitly to do so (i.e -inline ...)?
>
> No, the beam compiler currently does no inlining at all by default. You have to specify +inline on the command line or -compile(inline) in the module. (Now that line number information is included in exceptions, inlining could perhaps be turned on by default. Previously, it could make error messages confusing by pointing to the function where the code was inlined rather than to the actual source code function.)
>
> /Richard
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list