A rumor about the long-term Java performance

Source: Internet
Author: User

There are a lot of articles on the Internet to illustrate the performance of Java optimization of the good words are not lost C + +, and some are through some actual code testing to illustrate, but in some tests are obviously cheating

This article is not intended to be discussed in long speeches, but simply to illustrate some of the truth


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" j_0064.gif "/> Why few people doubt the efficiency of C + +, Why is the suspicion always Java, why suspect python,php and other scripts are not many people?

Java will not be a man, the first line of life, see after Good xx. Java always want to be perfect, any field want to plug a foot, as a perfect language, how can fall behind the performance, this many do not face, so there is a ridiculous thing, always want to prove in the performance with C + + in a level, and each version of the update will say that performance has a great upgrade, After all these years of ascension, the result? Can only cheat some people who don't really want to be in the crowd.


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" J_0064.gif "/>GC is a major problem in Java performance

In fact, the truth should be the reverse, not the GC affects Java performance, but Java corrupt GC reputation, GC and Malloc/free are dynamic memory management method, the application of memory operation is basically the same, the difference is to choose the timing of the release of the problem, usually the GC release action automatically triggered , but the implementation does not prohibit manual triggering, just some language refused to do so, automatic memory management must not be optimal, full manual can have the opportunity to do the best, many times semi-automatic is a better choice. This does not want to discuss the GC implementation in detail, just want to objectively point out that the GC should be correctly recognized, more about GC content, please refer to: http://www.iecc.com/gclist/GC-faq.html


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" J_0064.gif "/>jit to achieve the same speed as C + +

Can only say that the JIT can improve the speed of Java, but does not mean that the JIT can be achieved and C + + speed, the reason is very simple, the compiled language is not only C + +, did not say that it can achieve the speed C/ For C language efficiency is the first, in order to efficiency can abandon many advanced features, and other languages for the characteristics can lose performance, this is the fundamental problem


650) this.width=650, "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" J_0064.gif "/>java popularity proves that the Java language is good enough

There are many reasons for the popularity of language, the reality is that language is not good enough not to affect the most popular reasons, but the support of commercial companies, the results of interest-driven, so the popularity is not a standard for evaluating the quality of language, but a reference value


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" J_0064.gif "/> Once compiled everywhere is Java the biggest bit

That's for scripting, it's going to be run all the time, and there's no script that says it's an advantage, and why Java can take this out for a while, and a lot of people actually write it all over again.


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" J_0064.gif "/>java inherits the advantages of C + + and also discards some drawbacks of C + +

I can only say that the biggest advantage of C + + is the second only to C language performance, with C-like platform control ability, almost seamless compatible with C (this is controversial, in fact, this is also the history of C + +), this is the competitiveness of C + +, Java has not inherited, just in the language features to do some articles, on this , Python,ruby and other languages may be more acceptable.


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0064.gif "alt=" J_0064.gif "/>java is simple

This is a word since the advent of Java, but also often cited by some books, can only say that Java is simpler than C + +, but does not mean simpler than C + + is called simple, because there is no language that is more difficult than C + +


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0020.gif "alt=" j_0020.gif "/> Temporarily write so much, what else would you like to add

Finally: Java always like and C + + ratio, in fact, there is no comparability, from the syntax, can recognize the C + + grammar design good people are not many, from this point with C + + grammar can not prove the grammar design good. different domains, C + + is a system programming language, C + + is synonymous with technology and performance (performance is one of its important goals, and C + + users are required to understand the platform-related technology to be used well), and Java is the application layer language, is synonymous with the ideal idea (hardware can improve performance , platform technology does not need to be understood, theoretically the JVM can provide everything, Java can do anything)


This article is from the "Li Yunxing blog" blog, make sure to keep this source http://quetzal.blog.51cto.com/3313934/1632879

A rumor about the long-term Java performance

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.