[erlang-questions] is the compiler smart enough to ...
Sun Dec 25 21:15:19 CET 2011
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) ->
>> 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.)
> erlang-questions mailing list
More information about the erlang-questions