-
Notifications
You must be signed in to change notification settings - Fork 906
VarHandle string encoder #7701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
VarHandle string encoder #7701
Conversation
db27d02
to
780fafd
Compare
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (79.08%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7701 +/- ##
============================================
- Coverage 90.12% 90.09% -0.03%
- Complexity 7187 7191 +4
============================================
Files 814 817 +3
Lines 21700 21731 +31
Branches 2123 2122 -1
============================================
+ Hits 19557 19579 +22
- Misses 1477 1488 +11
+ Partials 666 664 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b9e69c2
to
ff9ae14
Compare
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
abstract class AbstractStringEncoder implements StringEncoder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code in this class is just moved (cut-and-paste) from StatelessMarshalerUtil
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change | ||
* at any time. | ||
*/ | ||
final class FallbackStringEncoder implements StringEncoder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code in this class is just moved (cut-and-paste) from StatelessMarshalerUtil
ff9ae14
to
c5bd6de
Compare
Note that unlike the
UnsafeStringEncoder
, theVarHandleStringEncoder
requires--add-opens=java.base/java.lang=ALL-UNNAMED
since the VarHandles need access to String internals.Generally users won't do this and so won't get the VarHandle implementation, but the Java agent is able to automatically open these modules (see ModuleOpener.java in that repository).
Java 17 Results
StringMarshalBenchmark Results
PR Branch Results
Main Branch Results
Java 24 Results
StringMarshalBenchmark Results
PR Branch Results
Main Branch Results