mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8288112: C2: Error: ShouldNotReachHere() in Type::typerr()
Reviewed-by: dlong, kvn
This commit is contained in:
parent
2bf6285c80
commit
fd89ab8dac
9 changed files with 216 additions and 8 deletions
|
@ -49,6 +49,7 @@ public class Longs {
|
|||
@Param("500")
|
||||
private int size;
|
||||
|
||||
private long[] res;
|
||||
private String[] strings;
|
||||
private long[] longArraySmall;
|
||||
private long[] longArrayBig;
|
||||
|
@ -57,6 +58,7 @@ public class Longs {
|
|||
public void setup() {
|
||||
var random = ThreadLocalRandom.current();
|
||||
strings = new String[size];
|
||||
res = new long[size];
|
||||
longArraySmall = new long[size];
|
||||
longArrayBig = new long[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
@ -141,4 +143,11 @@ public class Longs {
|
|||
bh.consume(longArrayBig[i] << longArraySmall[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public void reverseBytes() {
|
||||
for (int i = 0; i < size; i++) {
|
||||
res[i] = Long.reverseBytes(longArraySmall[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue