changeset 1365:cb9aa824b55a

Minor performance optimization in BenchmarkGenerator.buildAnnotatedSet().
author shade
date Tue, 25 Oct 2016 17:55:17 +0200
parents d0821c7627fb
children 90e9bafa6cd0
files jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Fri Oct 21 20:28:34 2016 +0200
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Tue Oct 25 17:55:17 2016 +0200
@@ -229,10 +229,11 @@
 
         Multimap<ClassInfo, MethodInfo> result = new HashMultimap<ClassInfo, MethodInfo>();
         for (ClassInfo currentClass : source.getClasses()) {
+            if (currentClass.getQualifiedName().contains("generated")) continue;
+            if (currentClass.isAbstract()) continue;
+
             ClassInfo walk = currentClass;
             do {
-                if (currentClass.getQualifiedName().contains("generated")) continue;
-                if (currentClass.isAbstract()) continue;
                 for (MethodInfo mi : walk.getMethods()) {
                     Benchmark ann = mi.getAnnotation(Benchmark.class);
                     if (ann != null) {