Erlang compilation: mixed of "HiPE object code" and "opcode"?
Asked Answered
U

1

5

Is it possible to have a VM instance that executes both HiPE code and the usual "opcode" based objects at the same time?

This question is related to : Erlang OTP release compiles with HiPE?

Utham answered 5/2, 2010 at 13:27 Comment(2)
related: #2207981Utham
related: #2207981Utham
B
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.

Bluejacket answered 6/2, 2010 at 10:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.