@Setup publicvoid setup() {
testObj1 = new BitSet(10);
testObj2 = new Date();
testObj3 = newchar[5];
testObj4 = newchar[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[]. */
@Benchmark publicvoid cloneThreeDifferent(Blackhole bh) {
bh.consume(testObj1.clone());
bh.consume(testObj2.clone());
bh.consume(testObj3.clone());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.