8341594: Use Unsafe to coalesce reads in java.util.zip.ZipUtils

Reviewed-by: lancea
This commit is contained in:
Claes Redestad 2024-10-08 08:14:40 +00:00
parent 57c859e4ad
commit ffb60e55cd
5 changed files with 96 additions and 100 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -107,4 +107,13 @@ public class ZipFileOpen {
zf.close();
zf2.close();
}
// Provide a simple one-off run without JMH dependencies enable simple debugging,
// diagnostics and dual-purposing this micro as a startup test.
public static void main(String... args) throws Exception {
var bench = new ZipFileOpen();
bench.size = 1024*4;
bench.beforeRun();
bench.openCloseZipFile();
}
}