看完这个问题Is Erlang the C of the clustered computing world?后,我想知道官方的Erlang OTP编译与HiPE?Erlang OTP版本使用HiPE编译?
换句话说,当我编译我的.erl
源与OTP版本R13(例如),它是否产生“目标代码”BEAM?
看着http://www.it.uu.se/research/group/hipe/,它似乎不再是独立的HiPE编译器。
看完这个问题Is Erlang the C of the clustered computing world?后,我想知道官方的Erlang OTP编译与HiPE?Erlang OTP版本使用HiPE编译?
换句话说,当我编译我的.erl
源与OTP版本R13(例如),它是否产生“目标代码”BEAM?
看着http://www.it.uu.se/research/group/hipe/,它似乎不再是独立的HiPE编译器。
默认情况下HiPE不用于编译OTP。然而,众所周知,OTP库可以使用HiPE成功编译,通常会提高性能(尽管取决于您的应用程序)。
当您在.erl
文件上运行erlc
时,它会生成BEAM文件,该文件不会编译为带有HiPE的本机代码。要使用HiPE将.erl
文件编译为本地代码,只需运行erlc +native file.erl
。
独立的HiPE编译器不再被维护,因为它被包含在Erlang/OTP核心发行版中。
+1:所以这就是“本地”选项!谢谢。 – jldupont 2010-02-05 13:29:20
我认为这取决于你在编译Erlang编译器时传递给configure脚本的选项。它当然可以包括它,但它是否默认是另一个问题。
相关:http://stackoverflow.com/questions/2207451/erlang-compilation-mixed-of-hipe-object-code-and-opcode – jldupont 2010-02-05 13:28:08
相关:http://stackoverflow.com/questions/2207481/what与原生编译的约束限制 – jldupont 2010-02-05 13:31:13