8245094: Reduce overhead of initializing the default StringConcatFactory strategy

Reviewed-by: psandoz, jlaskey
This commit is contained in:
Claes Redestad 2020-05-15 18:37:08 +02:00
parent e83968799e
commit 150d6cfea8
3 changed files with 10 additions and 6 deletions

View file

@ -1724,12 +1724,7 @@ public final class StringConcatFactory {
private static final long INITIAL_CODER;
static {
try {
MethodHandle initCoder = JLA.stringConcatHelper("initialCoder", methodType(long.class));
INITIAL_CODER = (long) initCoder.invoke();
} catch (Throwable e) {
throw new AssertionError(e);
}
INITIAL_CODER = JLA.stringConcatInitialCoder();
PREPENDERS = new ConcurrentHashMap<>();
MIXERS = new ConcurrentHashMap<>();