[J2SE 5.0 Topics] [1] Performance improvement

xiaoxiao2021-03-06  44

Since J2SE 1.4, there has been more than two and a half years, I believe that many people have expected this new JDK for a long time. I think there should be a lot of people who have a large increase in performance in the original 1.4 to 1.3 in performance, especially the introduction of Java.Nio (New I / O) packets and more fully support for HotSpot technology. So what surprises from J2SE 5.0 (CODENAMED TIGER) bring us?

The first is the improvement of the garbage collector. In 5.0, Java provides two VMs: Server VMs and Client VMs, where Server VM can better play performance for those who have higher configurations. This is optional when the Java program is running. I will try to discuss this topic in a later virtual machine part.

Secondly, the StringBuilder class is introduced. The invariableity of the String class and the relative high overhead of the StringBuffer class make the processing of String in Java has received a lot of disease and questioning, and now in 5.0, the StringBuilder class provides a "lightweight" dynamic string process. Class, which is the biggest difference between StringBuffer lies in it is non-thread safe, and most of us, when we use StringBuffer dynamically created the final String object, we do not need thread security.

Once again, it is amended and improved on Java 2D. Including the BufferedImage object acceleration, support for OpenGL, text drawing, etc.

Finally, it is optimized for image I / O. In addition to performance optimization, now in 5.0, all Javax.ImageIO implementations support read and write JPEG, PNG, BMP, and WBMP images, and read GIF images.

By the way, for those who are interested in the Java SE, you can take a look

Here.

More detailed information, more detailed information, can be referenced

Here.

转载请注明原文地址:https://www.9cbs.com/read-76372.html

New Post(0)