* commit '3b34b0061b1c57e5932fc17f8611574233e768ae': Reduce cost of span type checking
This commit is contained in:
@@ -214,10 +214,6 @@ import java.lang.reflect.Array;
|
|||||||
Object ret1 = null;
|
Object ret1 = null;
|
||||||
|
|
||||||
for (int i = 0; i < spanCount; i++) {
|
for (int i = 0; i < spanCount; i++) {
|
||||||
if (kind != null && !kind.isInstance(spans[i])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int spanStart = data[i * COLUMNS + START];
|
int spanStart = data[i * COLUMNS + START];
|
||||||
int spanEnd = data[i * COLUMNS + END];
|
int spanEnd = data[i * COLUMNS + END];
|
||||||
|
|
||||||
@@ -237,6 +233,11 @@ import java.lang.reflect.Array;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// verify span class as late as possible, since it is expensive
|
||||||
|
if (kind != null && !kind.isInstance(spans[i])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
ret1 = spans[i];
|
ret1 = spans[i];
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
Reference in New Issue
Block a user