5

是否有可能同时执行 HiPE 代码和通常的基于“操作码”的对象的 VM 实例?

这个问题与:Erlang OTP release compiles with HiPE?

4

1 回答 1

6

Yes, that is how the native compiler is integrated. Only those modules that are compiled with the +native option are executing in native machine code, and the rest are interpreted by the BEAM emulator as usual. When you make calls between modules compiled in different ways, a "mode switch" happens. This way, you can mix native and emulated modules seamlessly. Still, you should try to select which modules you native compile so that you avoid mode switches in tight, performance critical loops, because there is a small overhead each time.

于 2010-02-06T10:15:25.953 回答