You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
String is very common in serialization, but due to its variable length and mutiple encoding, string serialization is pretty slow, sometimes is becomes the bottle of whole serialization. We need a way for fast string serialization.
The bottle mainly consists of:
String data serialization copy: copy inner char[] / byte[] outside for serialization.
String encoding: encoding char[] / byte[] into ascii/unicode16/utf8
String decoding: decoding binary into ascii/unicode16char[]/byte[]
String creation copy cost: java.lang.String will copy provided char[]/byte[] for immutability.
Describe the solution you'd like
Use sun.misc.Unsafe for extract inner char[] / byte[]
Support ascii/unicode16/utf8 to minimize encoding cost
Add encoding flag in data to support multiple encoding
Use java.lang.invoke.MethodHandle to avoid invoke package-level zero0-copy constructor with minimal cost
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
String is very common in serialization, but due to its variable length and mutiple encoding, string serialization is pretty slow, sometimes is becomes the bottle of whole serialization. We need a way for fast string serialization.
The bottle mainly consists of:
char[]
/byte[]
outside for serialization.char[]
/byte[]
intoascii
/unicode16
/utf8
ascii
/unicode16
char[]
/byte[]
char[]
/byte[]
for immutability.Describe the solution you'd like
sun.misc.Unsafe
for extract innerchar[]
/byte[]
ascii
/unicode16
/utf8
to minimize encoding costjava.lang.invoke.MethodHandle
to avoid invoke package-level zero0-copy constructor with minimal costThe text was updated successfully, but these errors were encountered: