Thu Dec 11 11:19:55 CET 2003
If the effort (in sence of valuable time) already has been made,
then it is obviously a good thing to have it doing 2 by default
and 3 by adding some compiler directive.
Erik Stenman wrote:
> You must be kidding, right?
> As it is now the compiler always does constant propagation and folding.
> If you write:
> A = 1 + 2,
> you get
> A = 3,
> in the compiled beam code.
> (These types of expressions do come up, especially if you are using
> The problem is that if you write
> a + 1,
> then the compiler has to spend extra time compiling the expression,
> handling the
> special case that constant folding does not work, and produce larger
> code than necessary.
>> I would not like having anyone wasting their valuable time
>> improving the compiler to catch this
> This already has to be cached and handled by the compiler.
>> and also wasting more
>> CPU power on everyones computer when compiling.
> More CPU power is probably used today in order to 'fix' this
> special case, at least for native code.
More information about the erlang-questions