Impact of native compilation

Mickael Remond <>
Fri Sep 6 19:22:06 CEST 2002


Hello,  
  
We were wondering with Thierry Mallard about the impact of native compilation.  
We tried to compare a big amount of floating point operations (100 millions).  
The result is greatly improved over standard Erlang.  
The result is also far from the C execution time.  
  
We were wondering why the result was different. Is there many more operations  
implied by Erlang ?  
  
The test are at the bottom of this email.  
  
I have not yet tested the same example with ETOS. Does someone know the  
expected impact with ETOS ?  
   
Thank you for you help. 
  
--   
Mickaël Rémond  
  
  
-=-=-=-=-=-  
Erlang test:   
   
Erlang (BEAM) emulator version 2002.09.05 [source] [hipe] [threads:0]    
    
Eshell V2002.09.05  (abort with ^G)    
1> c(test2, [native, {hipe, [o3]}]).    
{ok,test2}    
2> test2:run().     
{5820686,ok}    
======= >Means 5.8 seconds.    
-=-=-=-=-=-  
[ test]$ g++ -O3 -o testmulti testmulti.cpp  
[ test]$ ./testmulti  
0.27user 0.00system 0:00.89elapsed 30%CPU (0avgtext+0avgdata 0maxresident)k  
0inputs+0outputs (129major+34minor)pagefaults 0swaps  
======= >Means less than 1 second.  
  
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test2.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20020906/3f132699/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmulti.cpp
Type: text/x-c++src
Size: 103 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20020906/3f132699/attachment.bin>


More information about the erlang-questions mailing list