hazelcast/hazelcast — pull request #1467 by noctarius (2013-12-29 21:08:55+00:00)
Title: Utf bytecode generator

Added a lot of bytecode generation based UTF8-String creators to get rid of the Object[] array which is created while invoking a reflection based constructor.
The Java8 generator uses sun.misc.Unsafe::newStringUnsafe which was added in Oracle Java 8 while the MagicAccessorImpl based ones using the same trick as internal reflection classes which are generated at runtime on Sun/Oracle/IBM JVMs.
For all other JVMs it just uses the reflection based accessor to the String constructor or if nothing else works it falls back to new String(char[]) which will use System.arraycopy internally and copies the char-array.