Erlang Compilation: Mixed “HiPE Object Code” and “Operation Code”?

Is it possible to have an instance of a virtual machine that simultaneously executes both HiPE code and ordinary objects based on the "opcode" code?

This question is related to: Is Erlang OTP debugging compiled using HiPE?

+4
erlang hipe
Feb 05 '10 at 13:27
source share
1 answer

Yes, so the built-in compiler is built-in. Only those modules compiled with the + native option are executed in their own machine code, and the rest are interpreted by the BEAM emulator, as usual. When you make calls between modules compiled differently, a "mode switch" occurs. This way you can easily mix your own and emulated modules. However, you should try to choose which modules you inherit to avoid switching modes in tough critical performance cycles, as you have to do a little overhead each time.

+5
Feb 06 '10 at 10:15
source share



All Articles