Yahoo Canada Web Search

Search results

      • Python has a compiler! You just don't notice it because it runs automatically. You can tell it's there, though: look at the.pyc (or.pyo if you have the optimizer turned on) files that are generated for modules that you import. Also, it does not compile to the native machine's code.
      softwareengineering.stackexchange.com/questions/136942/why-doesnt-python-need-a-compiler
  1. Two concepts might help us understand better why Python compiled to native machine code "may" not run as fast as compiled C or other commonly compiled languages. They are called early binding and late binding.

  2. When we execute some source code, Python compiles it into byte code. Compilation is a translation step, and the byte code is a low-level platform-independent representation of source code. Note that the Python byte code is not binary machine code (e.g., instructions for an Intel chip).

  3. Feb 26, 2012 · Python does not need a compiler because it relies on an application (called an interpreter) that compiles and runs the code without storing the machine code being created in a form that you can easily access or distribute.

  4. Oct 19, 2021 · Yes, you can create a compiler for any language, even python. And yes, python already isn't a "fully" interpreted language - there are some compilation steps that are done. But it is still considered an interpreted language since there really isn't a native compiler that translates it into machine code (assembly)

  5. They are not the same as the machine code generated by a C compiler for a native machine architecture. Some Python implementations, however, do consist of a just-in-time compiler that will compile Python byte code into native machine code.

  6. Mar 13, 2023 · Codon by Exaloop is a new python compiler that can compile directly to machine code. It uses the LLVM framework to compile to LLVM bytecode and then to specific machine code. I’m intrigued...

  7. Sep 5, 2021 · The key distinction is a clean separation between compile time and run time. In Python, for instance, import happens at runtime, and can happen conditionally. And per the halting problem, that means a compiler cannot determine up front if a given import will happen.

  1. People also search for