Count the Java rumors that we are used to, and count the Java rumors.

Source: Internet
Author: User

Count the Java rumors that we are used to, and count the Java rumors.

I am an opponent of Java. One of the biggest reasons I think is that it is not true, whether it is what sun said or some comments made by Java users today, all of these statements are confusing, and even many are too false. These comments are endless. In fact, I don't want to say anything about the language itself. Any language has its own truth, there are also application scenarios suitable for it, but if it is always exaggerated, it is really unpleasant

 

1. Java is simple

Is Java simple? Anyway, I don't think it is. Of course, this is what Java said when it was just introduced. It seems that it was barely mentioned at the time, but this sentence is still being referenced, it is always in comparison with C ++. It cannot be simpler than C ++. Do some people think that there are more complex languages than C ++? This comparison is obviously problematic.

2. One compilation is run everywhere

There should be a premise for this sentence, that is, as long as there is a JVM on that platform, but I don't want to chew on it to find the vulnerability, it is not convincing. I don't think this is a good advantage, first of all, it is not advantageous for a script language to run everywhere when it is compiled (No compilation is required). However, there is no scripting language to tell this story. Why does Java always talk about this, in addition, this sentence is not a plug-in for a compilation and debugging. There are also bytecode that will often be used as if only java has an intermediate code. In fact, almost all interpreted languages have intermediate code, which is the characteristic of interpreted languages, this feature is available before Java is available. Let Java speak as if it was created, and other languages imitate it.

Iii. JIT optimization technology can speed Java up to C/C ++, and even surpass

The performance of Java has always been a pain point for Java developers. Almost every version update, whether it was sun or oracle in the past, indicates that the performance has been greatly improved, and every time, like a reassurance, It comforts its users and gives everyone confidence in Java's performance. However, since the birth of Java, it has been upgraded for so many years. No matter how much it is upgraded, there are too few clients (except andriod) using Java, even if the performance of pure java eclipse is uncomfortable, the server should also be divided into applications, and not all server programs are suitable for using Java, generally, the performance of the language itself is not the biggest bottleneck, because the biggest bottleneck in some scenarios may be IO or database. Why can't JIT make Java catch up with C ++? The reason is very simple: Compilation languages are not only C/C ++, and no language is available yet, just JIT? Obviously, it is unrealistic. In fact, this is determined by the features of the language. The implementation of C is to give up advanced features for performance. The performance of C ++ is also one of its most important goals, other languages sacrifice performance for advanced features. In terms of language positioning, optimization cannot catch up with C/C ++, because optimization cannot violate the language positioning, this is actually a problem that both the fish and the bear's paw cannot have at the same time. It can be used only when the performance can satisfy the application, but do not exaggerate it. The more people who feel inferior, the more self-esteem they have, the less likely they are to admit weakness, however, there is no need to overemphasize that this is not a weakness. The more you emphasize it, the more you doubt it.

Speaking of performance issues, I think. net is relatively real. I used it in the past. net 1.1, the performance is very poor, a common WinForm window, if more controls are arranged in it, you can see the order of Drag and Drop controls during running, very obvious, but now it is much better, basically the eyes are invisible, and they are all come together, So now many Windows programs are used. net is also very good

Iv. GC is one of the culprit in Java Performance

I think back, it should be said that Java has ruined the reputation of GC, because many people have known GC through Java, which makes GC a synonym for slowness in many people's minds, in fact, this is a common misunderstanding of GC. GC is actually just a concept. GC has been considered to be implemented by the operating system. Since the operating system has not been implemented, it is implemented by the programming language, it also leads to a variety of implementations. Performance depends on the specific implementation and algorithm selection. This is a dynamic memory management technology. It works the same as the malloc/free function of C, but GC can be more advanced, malloc/free is usually used according to certain conventions to avoid Memory leakage. The main difference between GC and manual memory management is that GC requires certain algorithms to choose how to release the memory, manual. The other is that the release time options are more manual and GC is usually not very free. What I am talking about is that some languages do not allow the control of GC. In fact, GC implementation is controllable, some languages do not allow this. The problem lies in this. GC algorithms take time, while GC algorithms cannot guarantee the optimal performance, in fact, a controllable GC is a better choice for performance and development efficiency. choose whether to automatically manage or manually control GC based on the situation, just like the solution of D language, which uses GC, however, the performance is very high, and GC is controllable. Your program does not have to rely entirely on the GC algorithm. I generally call this method semi-automatic, which is better, how to manage memory should be developer's freedom, because fully automated GC may sometimes cause application program freezing, especially when GC memory management is not suitable, this makes some types of programs difficult to accept. For example, in a shooting game or a video decoder, even a little choppy experience is very bad (less than 24 Gb/s in a second ), however, in an application such as web, the server can hardly feel that the client is suspended for a short period of time. Even if the client is suspended for a long time, the user may think it is a network problem or a browser problem.

  

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.