Java9 collection

Java9 Released on September 21, 2017 (* US time). Don't you remember "* US time" in the US-US CLUB? Now, "Kome Kome Club" has been converted in one shot.

List of changes

JDK9 Features

Many

Viewpoints

  1. Impact --A guy who can affect released stuff without playing with the source ――A guy who will affect future design and coding
  2. Hobbies ――The guy who is affecting the vicinity of the VM

Extraction

Jigsaw-based guy

I don't have to go into details because I have more information, but when I look at that package-related graph, it looks like "Uh".

jshell Another cup (ry

The guy around the String

Compact Strings --Reduce memory by specializing the time of Latin-1 (alphabet and Arabic numerals, around half-width symbols)! ――I said, but it's counterproductive if it's a multi-byte character area, isn't it? --Details here → The String class was refactored even in Java9 (JEP 254: Compact Strings edition)

Indify String Concatenation --Improved the method of " str "+" ing " by using the Invoke dynamic instruction. ――You don't have to worry about the history of StringBuffer → StringBuilder, which has been around in the past. ――In the coming era, "Use StringBuilder!" Is clearly outdated as anything. ――But for the time being, let's use Builder for string concatenation that is in for or while or contains variables. ―― ~~ indy turns around at runtime, so you can benefit from compiled libraries ~~ - 2017/11/06 modified --A library compiled by Java 9 to be combined indy will use the current orientation even if it is used in later versions. --Mr. tsuyoshi_cho pointed out that it is "limited to libraries compiled to use indy" and corrected.

Store Interned Strings in CDS Archives --First of all, there is a method called java.lang.String # intern (), which "pools the Strings used so far and pulls them from there". --By improving this pooling location, "Prepare a pool that can be shared by another process to reduce memory" --However, it is applicable only when using the 64-bit version and G1GC. ――Since the goal is to reduce memory, it seems that it will not be speeded up, or rather it will be a little slower, because it is "<2-3%", "it will only deteriorate within 2-3%". --In the first place, java.lang.String # intern () is a heavy process, so I don't think it's something to worry about.

Deprecate the Applet API Applet? He died.

Unicode 8.0 An internal representation that has been casually upgraded. There is also Unicode7.0.

Make G1 the Default Garbage Collector --One more cup (ry --The default garbage collector will be G1 --Since the heap is divided and governed, the time required for garbage collect in the case of a large heap is predictable and small. --The valid heap size seems to be around 6GB --A person specializing in GC tuning said, "Determine the region size by calculating back from the GC time per time."

UTF-8 Property Files --UTF-8 can be used for resource bundles --Can be explicitly used in ISO-8859-1 and UTF-8

More processing for java.util.stream.Stream

--I'm glad that the infinite Stream that receives Predicate and continues until the conditions are met --Parallel Files.lines () is nice ――But it seems to be after memory mapping, so after all it seems that there are many cases of sequential Stream # read () ――In the first place, there seems to be almost no situation where you will be happy to use Java.io Stream in parallel, distributed file system, broadcast?

Convenience Factory Methods for Collections Set<String> s = Set.of("a", "b", "c"); You don't have to make it.

Java-Level JVM Compiler Interface --Matters that should not be touched, such as inserting machine code into the JVM --It seems to be used when creating a dynamic compiler, such as using it in Graal. --There is an API to get the progress of JIT and how the code is currently deployed. --As expected, it is not applied unless the startup option is specified.

other

-[Java VM "Eclipse OpenJ9" released. IBM fulfills its promise to "open source at the same time as Java 9" (http://www.publickey1.jp/blog/17/javavm_eclipse_openj9.html) --Java EE also goes to IBM --It seems to be called EE4J (Eclpse Enterprise for Java) → Introducing EE4J: Java EE takes first steps into Eclipse Foundation

Recommended Posts

☾ Java / Collection
Java9 collection
Java Reintroduction-Java Collection
[Java] Collection framework
Expired collection of java
Java collection interview questions
Java
Java
Getting Started with Java Collection
Java parallelization code sample collection
[Java] Comparator of Collection class
Java test code method collection
What is a Java collection?
Deep copy collection in Java
Java learning (0)
Studying Java ―― 3
[Java] array
[Java] Annotation
[Java] Module
Java array
Java tips, tips
Java methods
Java method
java (constructor)
Java array
[Java] ArrayDeque
java (override)
java (method)
Java Day 2018
java (array)
Java static
Java serialization
JAVA paid
Java (set)
java shellsort
Studying Java -5
java reflexes
java (interface)
Java memorandum
Studying Java ―― 1
[Java] Array
[Java] Polymorphism
Studying Java # 0
Java review
java framework
Java features
Java features
java beginner 3
Java memo
java (encapsulation)
Java inheritance
[Java] Overload
Java basics
Decompile Java
[Java] Annotation
java notes
java beginner
Java (add2)
JAVA (Map)
[java] interface
Java basics