What is Python slower than C

Source: Internet
Author: User

Python is known to perform slower than C. Why?

Let's take a look at the following picture:

Python's traditional run execution mode: the input source code is converted to bytecode, after which the bytecode runs in the Python virtual machine. The code is automatically compiled and then interpreted as machine code execution in the CPU.

Additional notes:

1. Bytecode differs from machine code and is a form of representation specific to Python.

2.PVM is the shorthand for Python virtual machine, the Python vm.

The C compiler compiles the C source code directly into the machine code. The process is less than the Python execution process, bytecode generation and virtual machine execution bytecode process. So nature is faster than Python.

What is Python slower than C

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.