Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
13
-
b16
Description
As suggested in RFR thread for JDK-8221723 (http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-April/059480.html) we can add a boolean/byte to String to mark that a String.hash has been calculated as zero with neither footprint nor notable performance penalties.
On top of the patch suggested by Peter, we should make the VM code cooperate when necessary, but with the suggested approach VM code typically does not need to set the hashIsZero flag to be semantically consistent.
On top of the patch suggested by Peter, we should make the VM code cooperate when necessary, but with the suggested approach VM code typically does not need to set the hashIsZero flag to be semantically consistent.