mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8300647: Miscellaneous hashCode improvements in java.base
Reviewed-by: stsypanov, rriggs
This commit is contained in:
parent
453dbd12ee
commit
d85243f02b
2 changed files with 6 additions and 36 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
package sun.security.util;
|
||||
|
||||
import jdk.internal.util.ArraysSupport;
|
||||
import sun.nio.cs.UTF_32BE;
|
||||
import sun.util.calendar.CalendarDate;
|
||||
import sun.util.calendar.CalendarSystem;
|
||||
|
@ -1257,11 +1258,7 @@ public class DerValue {
|
|||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = tag;
|
||||
for (int i = start; i < end; i++) {
|
||||
result = 31 * result + buffer[i];
|
||||
}
|
||||
return result;
|
||||
return ArraysSupport.vectorizedHashCode(buffer, start, end - start, tag, ArraysSupport.T_BYTE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue