提交 56fc9311 authored 作者: noelgrandin's avatar noelgrandin

Optimisation to compareRows, noticed by Ronald (rkrijgsheld@gmail.com)

上级 7f21dd1e
...@@ -166,6 +166,9 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index { ...@@ -166,6 +166,9 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
} }
public int compareRows(SearchRow rowData, SearchRow compare) { public int compareRows(SearchRow rowData, SearchRow compare) {
if (rowData == compare) {
return 0;
}
for (int i = 0, len = indexColumns.length; i < len; i++) { for (int i = 0, len = indexColumns.length; i < len; i++) {
int index = columnIds[i]; int index = columnIds[i];
Value v = compare.getValue(index); Value v = compare.getValue(index);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论