diff options
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/src/benchmarks/regression/ReflectionBenchmark.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/benchmarks/src/benchmarks/regression/ReflectionBenchmark.java b/benchmarks/src/benchmarks/regression/ReflectionBenchmark.java index f8f3c93d3..fcb26364b 100644 --- a/benchmarks/src/benchmarks/regression/ReflectionBenchmark.java +++ b/benchmarks/src/benchmarks/regression/ReflectionBenchmark.java @@ -156,6 +156,13 @@ public class ReflectionBenchmark extends SimpleBenchmark { } } + public void timeClass_classNewInstance(int reps) throws Exception { + Class<?> klass = C.class; + for (int rep = 0; rep < reps; ++rep) { + klass.newInstance(); + } + } + public void timeGetInstanceField(int reps) throws Exception { for (int rep = 0; rep < reps; ++rep) { // The field here (and in timeGetStaticField) were chosen to be |