提交 a18685a6 authored 作者: Vladislav Bauer's avatar Vladislav Bauer

Tiny optimization: use `System.arraycopy` when possible

上级 b824b78d
......@@ -336,9 +336,7 @@ public class Aggregate extends AbstractAggregate {
array[i + 1] = o.expression.getValue(session);
}
} else {
for (int i = 1; i <= size; i++) {
array[i] = remembered[i];
}
System.arraycopy(remembered, 1, array, 1, size);
}
v = ValueArray.get(array);
}
......
......@@ -30,9 +30,7 @@ public class FunctionCursorResultSet extends AbstractFunctionCursor {
int columnCount = result.getVisibleColumnCount();
Value[] currentRow = result.currentRow();
values = new Value[columnCount];
for (int i = 0; i < columnCount; i++) {
values[i] = currentRow[i];
}
System.arraycopy(currentRow, 0, values, 0, columnCount);
} else {
values = null;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论