0
$\begingroup$

First, this is not an opinion question. I'm interested in if there is some kind of objective answer. If there isn't, then the answer would be "no".

Is bytecode ("virtual machine code" for a "virtual processor") inherently faster to compile and/or interpret, than higher level (above Assembly) languages? What I mean is, does the bytecode map to the machine instructions of the underlying processor more easily than some higher level language? Why I ask is, it doesn't seem entirely certain to me that it does.

$\endgroup$

1 Answer 1

4
$\begingroup$

does the bytecode map to the machine instructions of the underlying processor more easily than some higher level language?

That depends entirely on the bytecode, the higher level language, and the machine instructions.

For example, Haskell semantics map closely to the Reduceron CPU, whereas JVM bytecode semantics do not.

ESPOL semantics map closely to the B5000, whereas CLI CIL semantics do not.

C semantics map better to AMD64 than JVM bytecode does, but JVM bytecode semantics map better to picoJava than C does – in fact, JVM bytecode is picoJava's machine code.

For every pair of high level language and bytecode, one can design a CPU that performs horrible for one or the other.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.