Why is the Java Virtual Machine so much larger than the Python Virtual Machine?

Source: Internet
Author: User
Okay... I'm not a computer engineer, but I have installed JVM and PVM .. Java size: python size: Thanks for adding the python installation package and some standard libraries, so the interpreter should be smaller. But I don't know how big PVM is. Okay... I'm not a computer engineer, but I have installed JVM and PVM ..
Java size: python size: ==================
Thank you!
The python installation package also contains IDLE and some standard libraries, so the interpreter should be smaller.
But I don't know how big PVM is. Reply content: the Python virtual machine is a simple interpreter. java will interpret the profile and then compile the specific code in real time based on the profile results. The size is naturally larger than that of jvm and google is available, in the past, sun, oralce, ibm, bea, and many other companies, plus China's ali. So many resources are involved in research and development of jvm, it should not be comparable to python. Thank you!

Python virtual machines/interpreters are toys compared with Hotspot. Besides, there is certainly no difference between virtual machines and interpreters. Most of the time you are talking about is that the runtime database is counted as the entire runtime environment database, which accounts for a large number of python 20 or 30 years now, earlier than java. Java has gone through numerous innovations since the first version, but python still has GIL. At first glance, we know that one is a toy, the other is able to work, and the size is the same. Because Java code is much longer than Python code. My life is short. I use Python. I think it's quite good to go back to it. I can only say that toys are really fun and tools are hard to use.
Well, the joke is over. Someone mentioned above mentioned the library portability problem. How should we say that python is a glue language first, so the library is the code block that is glued to (many are written by C and packaged, which is also the reason why pvm is slow, but Python feels pretty fast). Generally, Linux is a so plus one. py packaging, obviously, is not directly cross-platform, java itself is for cross-platform, so most of the libraries are running on JVM, so can directly run. because the java library is also the bytecode for interpretation and execution, it is relatively waste of memory and a little slower (after all, there is a conversion or jit process ). While the Python mode is a bunch of native code and a little script, only the script needs to be explained. Although pvm is much slower, it almost does not feel the existence of this speed disadvantage. Joke: Python 3. Can Java virtual machine run java1 2 3 4 5 6 7 8 code, and python3 can run 2 code?

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.