Why does the JIT implementation in many languages fail at last? What are the main technical reasons and difficulties?

Source: Internet
Author: User
Why does the JIT implementation in many languages fail at last? What are the main technical reasons and difficulties? Example: Why does the JIT implementation of many languages fail at last in unladen-swallow-AfasterimplementationofPythonpsyco.sourceforge.net? What are the main technical reasons and difficulties?
Example:
Unladen-swallow-A faster implementation of Python
Http://psyco.sourceforge.net/ Reply: Let's take a look at pypy and rubinius. The more JIT is optimized, the slower the interface to interact with C, the more complicated it is. The community environments such as py and ruby that are highly dependent on third-party C extensions are hard to bear these legacy. Rubinius syntax is not compatible, and few people can use it; pypy you can use C extension. On the other hand, jruby is compatible with rails to a great extent, and it has been relatively successful now with a real multi-thread without GIL. As for the embedded script engine running in sandboxes such as lua and js, there is almost no such statement as C extension (package management is not mentioned), but the optimization is fierce. JIT improves efficiency while sacrificing code clarity and cross-platform. Generally, merge does not return to the primary branch and can only be maintained in parallel. At the same time, it is difficult to find sufficient maintenance strength because of poor definition and cross-platform performance. The JIT in which language fails most of the JIT mentioned by the landlord is related to Python, but the Python keyword should not be thrown away, because it is obviously not JIT that has led to the failure of improving these projects. So the correct question should be: Why does many of Python's JIT Release versions fail?

If the problem is confined to Python, it is true. However, it is not JIT that causes the failure of these projects. JIT actually solves the problem of slow execution of Python instruction code interpretation. Therefore, Pypy or Jython can surpass Cpython in many performance test indicators. In this sense, it does not fail. However, the most critical issue is forward compatibility. After JIT is used and reference counting is removed, these implementations are not compatible with the previous Python library. Therefore, many Python libraries cannot be used, such as Numpy. Because of compatibility, although the execution efficiency has been improved to some extent, many old libraries are unavailable.

Python is not a language with long execution efficiency. Therefore, the improvement in execution efficiency cannot compensate for forward compatibility. Therefore, these versions are certainly not to be seen. However, I still won't say that these projects are "failed.

Earlier this year, Dropbox started a project called Pyston, committed to not only JIT Python execution, but also maintaining forward compatibility. Good luck with so many previous project crashes. I feel that pypy jit is very successful. Many logical operations are even close to the go speed. Pypy is probably the future of python in the server field. Transformation to jit is basically successful, but it is difficult to prove the failure.
If you want to prove that you are the best language in the universe, different languages generally have little impact on the efficiency of business processing. Successful languages play the most basic role in different fields, however, if we blindly make jit for the script language and want to compare it with the compiled language, the result is not "too overjoyed", and we finally have doubts about the language. But does jit fail? Actually, no, he didn't prove anything. Even the performance of unladen-swallow has been greatly improved, but it fails to reach the expected goal. the word "failure" is too heavy. Are you talking about that language? php or js?

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.