The operating principle of several common language C,c#,java,python

Source: Internet
Author: User

The operating principle of c,c#,java,python relative to several common languages


Because the CPU can only recognize the machine code, that is, we often say that the binary code 01010101

Any language that runs on a computer eventually translates to a machine code that the CPU can recognize 010101


For the C language: The C language code compiler will write out the C language code to compile the machine code, and then machine code can be given to the CPU to identify, that is, run


For other languages: The code compiler compiles the code into bytecode and then processes the bytecode further (converted) into machine code (0101010101) through the respective virtual machines, and then runs on the processor


Python and C first Python was developed with C.


Python's class library is complete and concise, and if you implement the same functionality, Python can be done in a few lines of code, and C can take hundreds of lines of code to implement


Python and C run faster, because Python has a compiler that converts Python code into bytecode, then converts the bytecode to Python's virtual machine into machine code, and C directly has the compiler directly converted to machine code, so Python and C are more C Language runs faster


Python and Java, C #, etc.

Linux is original with Python, no installation, and other languages are not, although they all have their own rich library of classes,

Python may be a little less fast.


types of Python:

    • Cpython
      The official version of Python, implemented using the C language, is the most widely used, and the CPython implementation converts the source file (py file) into a bytecode file (PYc file) and then runs on the Python virtual machine.

    • Jyhton
      Python Java implementation, Jython will dynamically compile Python code into Java bytecode, and then run on the JVM.

    • IronPython
      In Python's C # implementation, IronPython compiles Python code into C # bytecode and then runs on the CLR. (similar to Jython)

    • PyPy (Special)
      Python implements Python, which compiles Python bytecode bytecode into machine code.

    • Rubypython, Brython ...


This article is from the "study, Work, Life" blog, please be sure to keep this source http://cryan.blog.51cto.com/10837891/1708260

The operating principle of several common language C,c#,java,python

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.