Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
P-code machine
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==P-code versus machine code== While a typical [[compiler]] model is aimed at translating a program code into [[machine code]], the idea of a P-code machine follows a two-stage approach involving translation into P-code and execution by [[Interpreter (computing)|interpreting]] or [[just-in-time compilation]] (JIT) through the P-code machine. This separation makes it possible to detach the development of a P-code [[Interpreter (computing)|interpreter]] from the underlying machine code compiler, which has to consider machine-dependent behaviour in generating its [[bytecode]]. This way a P-code interpreter can also be implemented quicker, and the ability to interpret the code at runtime allows for additional [[Run-time checking|run-time checks]] which might not be similarly available in native code. Further, as P-code is based on an ideal virtual machine, a P-code program can often be smaller than the same program translated to machine code. Conversely, the two-step interpretation of a P-code-based program leads to a slower execution speed, though this can sometimes be addressed with [[just-in-time compilation]], and its simpler structure is easier to [[Reverse engineering|reverse-engineer]] than native code.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)