HIPE'd stdlib modules rule !!!
Kostis Sagonas
kostis@REDACTED
Tue May 27 12:23:28 CEST 2003
Chris Pressey <cpressey@REDACTED> wrote:
>
> Well, here's my experience -
> I recompiled kernel (except erl_epmd and hipe_x86_loader, which I
> couldn't get compiled for lack of proper header files) and stdlib
> (erl_parse took nearly 2 hours!) with +native.
Two comments here:
1. The way the Erlang/OTP Makefiles work, the only safe way to make
a library of the system is to touch the corresponding files and
then issue a "make" command at the top-level. This will generate
the appropriate header files (hipe_literals.hrl in this case).
2. The compilation time problem you are mentioning has already been
solved in the upcoming Erlang/OTP release (the fix is hard-coded).
To avoid the 2 hour compilation time (and bring the time down to
the 2 minute range), try the following:
erlc +native +'{hipe,[{regalloc,linear_scan}]}' erl_parse.erl
> [...]
>
> Clearly, not what I expected. Looking at the pibfi code, it may be
> that, even though it 'looks' sequential, it just relies on message
> passing too much (between the interpreter and the store, etc.)
>
> On the other hand - everything still worked; the output was correct.
Without knowing more about your application, it is very difficult to
say something intelligent here. Can it be that your application is
also heavily using other parts of OTP 9e.g. ets, ...) that you have
not compiled to native and you get penalized by mode switches?
Is this using R9B, and on which platform?
> Anyway, my feeling is that judicious use of +native is probably a
> better way to go than just compiling everything with HiPE ("+naive"? :)
Judicious use beats naive use of everything hands down, so I could not
agree more with the above. However, my experience is that it is very
easy to have the illusion that "everything" was compiled to native code.
Cheers,
Kostis.
More information about the erlang-questions
mailing list