diff -r a4ddd1667c72 -r 304c63b17b07 test/micro/org/openjdk/bench/java/lang/Clone.java --- a/test/micro/org/openjdk/bench/java/lang/Clone.java Tue Nov 05 10:11:18 2019 +0000 +++ b/test/micro/org/openjdk/bench/java/lang/Clone.java Thu Oct 31 17:16:36 2019 +0100 @@ -43,12 +43,17 @@ private BitSet testObj1; private Date testObj2; private char[] testObj3; + private char[] testObj4; + private String[] testObj5; @Setup public void setup() { testObj1 = new BitSet(10); testObj2 = new Date(); testObj3 = new char[5]; + testObj4 = new char[311]; + String str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut"; + testObj5 = str.split(" ", -1); } /** Calls clone on three different types. The types are java.util.BitSet, java.util.Date and char[]. */ @@ -59,5 +64,11 @@ bh.consume(testObj3.clone()); } + @Benchmark + public void cloneLarge(Blackhole bh) { + bh.consume(testObj4.clone()); + bh.consume(testObj5.clone()); + } + }