3 ms·
Language syntax has nothing to do with optimization. Java is easy to optimize because the machine types of values in the program can be determined at compile-t
by jrockway 17y ago
Language syntax has nothing to do with optimization. Java is easy to optimize because the machine types of values in the program can be determined at compile-time. (Of course, with runtime information, you can pick even better machine types, which is what JIT is.)
The reason why languages like Perl and Python run so slowly is not because of the syntax, but because of the semantics. When one value can be a number on one line and a string on the next, it is difficult to convert that sequence to fast machine instructions.