list comprehension compilation
Bjorn Gustavsson
bjorn@REDACTED
Tue Aug 1 15:43:13 CEST 2006
Thomas Raes <thomas.raes@REDACTED> writes:
> Compiling code that contains list comprehensions with lots of variables
> seems to take a long time on my system.
> For example, compiling the following code takes more than 4 minutes:
>
> test() ->
>
> [[X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15,X16,X17,X18,X19,X20] ||
> X1 <- [0],X2 <- [0],X3 <- [0],X4 <- [0],X5 <- [0],X6 <- [0],X7
> <- [0],X8 <- [0],X9 <- [0],X10 <- [0],
> X11 <- [0],X12 <- [0],X13 <- [0],X14 <- [0],X15 <- [0],X16 <-
> [0],X17 <- [0],X18 <- [0],X19 <- [0],X20 <- [0]].
Guess that you are first one to have use so many generators.
I have now corrected the performance bug; the correction will be included
in R11B-1.
> However, when I enter this code at the erl-prompt, it evaluates immediately.
The shell does not use the compiler for evaluating expressions.
/Bjorn
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list