Wouldn't Python be much faster if its code ran directly on a native machine?

66 views Asked by At

The Python Virtual Machine is different for different Operating Systems, but the bytecode is portable. I mean, why was the bytecode designed in the first place? Wouldn't Python be much faster if its code ran directly on a native machine?

1

There are 1 answers

0
ThomasStringer On

Yes it would be faster, but as you've mentioned, bytecode is used for portability. Anything which can run the virtual machine can run a Python program, without needed to recompile the code