On Wed, 18 Jan 2023 16:53:04 GMT, Claes Redestad <redes...@openjdk.org> wrote:

> `ZipCoder::checkedHashCode` emulates `StringLatin1::hashCode` but operates on 
> a `byte[]` subrange. It can profitably use the recently introduced 
> `ArraysSupport::vectorizedHashCode` method to see a speed-up, which 
> translates to a small but significant speed-up on `ZipFile` creation.
> 
> Before:
> 
> Benchmark                     (size)  Mode  Cnt       Score      Error  Units
> ZipFileOpen.openCloseZipFile     512  avgt   15   83007.325 ± 1446.716  ns/op
> ZipFileOpen.openCloseZipFile    1024  avgt   15  154550.631 ± 2166.673  ns/op
> 
> After:
> 
> Benchmark                     (size)  Mode  Cnt       Score      Error  Units
> ZipFileOpen.openCloseZipFile     512  avgt   15   79512.902 ±  814.449  ns/op
> ZipFileOpen.openCloseZipFile    1024  avgt   15  147892.522 ± 2744.017  ns/op

This pull request has now been integrated.

Changeset: bb42e61a
Author:    Claes Redestad <redes...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/bb42e61a6176a7f4f9485efa47a248b23b09a16d
Stats:     120 lines in 4 files changed: 103 ins; 8 del; 9 mod

8300493: Use ArraysSupport.vectorizedHashCode in j.u.zip.ZipCoder

Reviewed-by: alanb, lancea

-------------

PR: https://git.openjdk.org/jdk/pull/12077

Reply via email to