Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8369303

Optimize Arrays.hashCode(boolean[]) by delegating to ArraysSupport.hashCode

XMLWordPrintable

      `Arrays.hashCode(boolean[])` currently performs a naive scalar loop over the array elements, computing the hash as

      ```
      31 * result + Boolean.hashCode(element).
      ```
      This implementation is not consistent with other primitive array types (e.g., byte[], char[], int[]), which delegate to ArraysSupport.hashCode to enable optimized vectorized implementations.

            rkkumar Rohitash Kumar
            rkkumar Rohitash Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: