mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-11 00:12:04 -06:00
minor optimization on ary ctors
This commit is contained in:
parent
8eb3620caf
commit
31fb6eae7d
@ -69,7 +69,7 @@ public class Intersections {
|
||||
}
|
||||
|
||||
public static int[] find(int[] reference, int[] sample, int limit) {
|
||||
int[] result = new int[reference.length];
|
||||
int[] result = new int[limit];
|
||||
int a_index = 0, b_index = 0, acc_index = -1;
|
||||
int a_element, b_element;
|
||||
while (a_index < reference.length && a_index < limit && b_index < sample.length && b_index < limit) {
|
||||
@ -93,7 +93,7 @@ public class Intersections {
|
||||
return find(reference, sample, reference.length);
|
||||
}
|
||||
public static long[] find(long[] reference, long[] sample, int limit) {
|
||||
long[] result = new long[reference.length];
|
||||
long[] result = new long[limit];
|
||||
int a_index = 0, b_index = 0, acc_index = -1;
|
||||
long a_element, b_element;
|
||||
while (a_index < reference.length && a_index < limit && b_index < sample.length && b_index < limit) {
|
||||
|
Loading…
Reference in New Issue
Block a user