Why are Java virtual machines so much larger than Python virtual machines?

Source: Internet
Author: User
All right.. I'm not a computer master, I just installed the JVM and PVM.
Java size: Python size: =============
Thanks to the kind people who added
And the Python installation package also contains the idle and some standard libraries, so the interpreter should be smaller.
But I don't know how big the PVM is.

Reply content:

Python virtual machine is a simple interpreter Java in the interpretation of the same time and then based on the results of the profile of the specific code in real-time compilation function much more natural size of the JVM has Google, formerly Sun, Oralce, IBM, formerly Bea, There are many other companies, plus the domestic count Ali. So many resources are involved in research and development of the JVM, which should be less than Python. Xie invited

Python virtual machine/interpreter and hotspot these JVMs are compared to toys. Besides, the light is definitely not much different than the virtual machine/interpreter, and you're probably talking about the entire running environment of the run-time library. Python is now twenty or thirty years old and older than Java. Java has undergone countless innovations from the first edition to the present, while Python has the Gil. One can see that one is a toy, one is able to work, the size can be the same. Because Java code is a lot longer than Python code. Life is too short, I use Python, I feel very good back to the top, can only say that toys are simply too fun, tools difficult to use a pen
Okay, the joke is over, there is a mention of the issue of library portability, how to say, first Python is a glue language, so the library is the glue is glued to a piece of code block (many C is written and then packaging, which is also PVM very slow, But Python feels pretty fast for a reason. Generally Linux is a so plus one. PY wrapper, obviously not directly across the platform, Java itself is to cross-platform to do, so most of the library is running on the JVM, so can run directly. Because the Java library is also interpreted to execute the bytecode, so compare waste memory, also feel slow Point (after all, there is the process of conversion or JIT). The python pattern is a bunch of native code plus a bit of script, only the script needs to be explained, although PVM is much slower, but almost do not feel the existence of this speed disadvantage. Tell a joke: Python 3.java virtual function Run JAVA1 2 3 4 5 6 7 8 code, PYTHON3 can run 2 code?
  • 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.