[erlang-questions] Compiling erlang core modules with +native and -smp

Colm Dougan colm.dougan@REDACTED
Tue May 27 16:40:18 CEST 2008


Hi list,

I had to compile the Debian version of erlang from source (to apply
the zlib patch) and I noticed that there was an optional native.diff
patch which builds the core erlang modules (stdlib, io_lib etc) using
the +native option.  I decided to try this patch as I need all the
performance I can get :)

Anyway, later when I ran some code with this erlang using the -smp
option to 'erl' I got lots of warnings like this :

=INFO REPORT==== 27-May-2008::15:31:24 ===
<HiPE (v 3.6.3)> Warning: not loading native code for module io_lib:
it was compiled for an incompatible runtime system; please regenerate
native code for this runtime system

I guess this is because the +native code is not compatible with -smp
and modules need to be compiled with both +native *and* -smp in order
for the native code to be used.

My question is - if I intend to use -smp on my runtime system would I
be better off :
a] compiling the erlang core modules with +native *and* -smp.  Has
anyone experience of doing this?
OR
b] don't compile the core modules with +native at all

In general, is it worthwhile compiling the core modules with +native?
i.e. have people seen decent performance wins by doing this or is it
not really worth it?

Thanks,
Colm



More information about the erlang-questions mailing list