[erlang-questions] Why is erlc so quick to start?
Mon Jan 5 11:05:11 CET 2015
On 5 January 2015 at 09:14, Vlad Dumitrescu <> wrote:
> Maybe you can compare "erlc myfile" with "erl -s compile file myfile"? Or
> start some other code that does something relevant, with and without the
> magic arguments.
"erlc foo.erl" takes 0.18 secs.
"erl -noinput -s foo compile" takes 0.23 secs.
"erl +sbtu +A0 -noinput -mode minimal -boot start_clean -s foo
compile" takes 0.17 secs.
"+sbtu" doesn't seem to make any difference; "+A0" seems to
responsible for ~0.04 secs; "-mode minimal" for ~0.03 secs; "-boot
start_clean", again, seems to make no difference.
With an escript:
%%! +sbtu +A0 -mode minimal -boot start_clean
It takes ~0.17 seconds; without the %%! line, it takes ~0.23 seconds.
These are comparable to the above results.
These results aren't exactly scientifically rigorous. PC spec is as
given in my first email; Erlang is R16B03-1; OS is Linux Mint 17;
methodology was simply to run "/usr/bin/time whatever" at least 5
times and report the number that looked most like the mode.
More information about the erlang-questions