mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8299970: Speed up compiler/arraycopy/TestArrayCopyConjoint.java
Reviewed-by: chagedorn, kvn, thartmann
This commit is contained in:
parent
d1c87a03ad
commit
5d39d14522
2 changed files with 15 additions and 25 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -232,8 +232,7 @@ public class TestArrayCopyConjoint {
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
try {
|
for (int i = 0 ; i < 30_000 ; i++ ) {
|
||||||
for (int i = 0 ; i < 1000000 ; i++ ) {
|
|
||||||
int index = r.nextInt(2048);
|
int index = r.nextInt(2048);
|
||||||
testByte(lengths[i % lengths.length], index , index+2);
|
testByte(lengths[i % lengths.length], index , index+2);
|
||||||
reinit(byte.class);
|
reinit(byte.class);
|
||||||
|
@ -262,10 +261,6 @@ public class TestArrayCopyConjoint {
|
||||||
reinit(long.class);
|
reinit(long.class);
|
||||||
testLong_constant_LT64B (index , index+2);
|
testLong_constant_LT64B (index , index+2);
|
||||||
reinit(long.class);
|
reinit(long.class);
|
||||||
}
|
|
||||||
System.out.println("PASS : " + validate_ctr);
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println(e.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,27 +202,22 @@ public class TestArrayCopyDisjoint {
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
try {
|
for (int i = 0 ; i < 30_000 ; i++ ) {
|
||||||
for (int i = 0 ; i < 1000000 ; i++ ) {
|
testByte(lengths[i % lengths.length], r.nextInt(2048) , r.nextInt(2048));
|
||||||
testByte(lengths[i % lengths.length], r.nextInt(2048) , r.nextInt(2048));
|
testByte_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
testByte_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
testByte_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
testByte_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
|
||||||
|
|
||||||
testChar(lengths[i % lengths.length] >> 1, r.nextInt(2048) , r.nextInt(2048));
|
testChar(lengths[i % lengths.length] >> 1, r.nextInt(2048) , r.nextInt(2048));
|
||||||
testChar_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
testChar_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
testChar_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
testChar_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
|
|
||||||
testInt(lengths[i % lengths.length] >> 2, r.nextInt(2048) , r.nextInt(2048));
|
testInt(lengths[i % lengths.length] >> 2, r.nextInt(2048) , r.nextInt(2048));
|
||||||
testInt_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
testInt_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
testInt_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
testInt_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
|
|
||||||
testLong(lengths[i % lengths.length] >> 3, r.nextInt(2048) , r.nextInt(2048));
|
testLong(lengths[i % lengths.length] >> 3, r.nextInt(2048) , r.nextInt(2048));
|
||||||
testLong_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
testLong_constant_LT32B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
testLong_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
testLong_constant_LT64B (r.nextInt(2048) , r.nextInt(2048));
|
||||||
}
|
|
||||||
System.out.println("PASS : " + validate_ctr);
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println(e.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue