Skip to content

Utilise String coder and value field to optimise writing of ASCII strings #447

@ryanemerson

Description

@ryanemerson

It's possible to use a VarHandle to obtain the coder field on a String instance in order to determine whether the string uses only ASCII characters and if so, we can write the bytes directly from the String byte[]. Utilising a VarHandle for these fields requires that --add-opens java.base/java.lang=ALL-UNNAMED is provided as a JVM arg, therefore we should ensure that we can failback to the #413 optimisations when access to the coder is not possible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions