Details about the Python community

Source: Internet
Author: User

He was one of the core developers of the CPython project and the core developer of the Unladen Swallow project. He participated in the development of many Python projects. I hope you will learn more.

Recently it is rumored that Google will restrict the use of Python in its new project. For this reason, some developers expressed in K) publicly asked Collin Winter in the Google forum, collin Winter answered many acute questions. This post also attracts many high-quality posts.

Collin Winter: indeed, Google will restrict Python applications because Python is not as fast as Java and C ++, thread occupation, and memory usage are high when Python is used to develop a new system. We know what the system will do if the load is increased by 10 times or 100 times, and how bad the developed service will be. I think Python has developed into a slit.

Therefore, we should weigh the advantages and disadvantages of the choice. Maybe developers can use Python very efficiently, but as the system grows, there will be many platform-level performance restrictions. Collin Winter: Unladen Swallow aims to use Python in as many places as possible that it is not currently involved, and Unladen Swallow is not a panacea.

If no one has invested in Python, Python will still be slower than C and Java, occupying more memory and threads. I hope that the developer's attention to Python can form a virtuous circle. The more developers are interested and companies are interested, the more investment is injected to develop more Python resources. I think the best thing about Python and other dynamic languages is.

Many developers work on different subsystems, but all work on the same code base. The C or C ++ languages are different. The more developers participate, the more fragmented the code base. From this perspective, dynamic languages are easier to operate in sandbox. This agility and flexibility are important features of the Python language.

Collin Winter: I think applications like CPython cannot be as fast as V8 or SquirrelFish Extreme. After all, the latter two are designed for speed. We have also encountered some high-speed performance optimizations, but it is difficult to configure them in CPython, so we can only give up.

As an open-source project, CPython and V8 have different focuses: CPython emphasizes simplicity, that is, a simple and slightly slow kernel for people to maintain in their spare time. I have a high expectation for another Python project, PyPy, and hope it can get rid of the limitations of C-level backward compatibility and provide long-term performance solutions. But this wish may take ten years.

Collin Winter: Python community developers are rarely paid, and almost all of them are volunteers, while Ruby developers can get funds from sponsors such as EngineYard. So when they realize that the MRI servo web application is slow, they can better develop their VMS. This also determines that the things we develop take care of the needs of most people.

A Leon Sit developer adds here: I think CPython is not doing well in the aspect of digital code when the system grows. CPython depends on the C editor, but Windows does not have the C editor. To speed up CPython, print information needs to be added, and the syntax involved is not the standard syntax of Python.

Collin Winter: Another major goal of Unladen Swallow is to maintain compatibility with the C extension module, which is widely used by Google. Using Jython requires porting the infrastructure from SWIG to JNI, which is a very painful task and will inevitably bring about very tedious bugs. This is the primary reason why Jython is not selected as the baseline.

Jython is a full-time paid developer. So far, IronPython and Jython have to focus most of their development efforts on compatibility with CPython, with only a small focus on performance optimization. It can also be seen that supporting Python 3 affects projects such as Jython, IronPython, and PyPy.

Tom Machinski believes that Python is not compatible with low-level Virtual Machine LLVM. The commitment of the Unladen Swallow Project Team to improve performance by five times is not truly achieved. If the CPU consumes at least 90% of the execution time to run a short loop, CPython can undoubtedly increase this program by 100 times or more. But what if it is a big application? And don't forget, this kind of acceleration is usually only for a certain point of the program, that is, hot spot optimization ).

Do not get me wrong. Of course I am very interested in the Unladen Swallow project and hope it can truly achieve the goal. But I absolutely agree with Collin: even if all the goals of the Unladen Swallow project can be truly achieved, the Python community is not a competitor of Java or C ++.

  1. Introduction to Python system files
  2. How to correctly use Python Functions
  3. Detailed introduction and analysis of Python build tools
  4. Advantages of Python in PythonAndroid
  5. How to Use the Python module to parse the configuration file?

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.