1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Smaller and faster vdbeSorterCompareText().

FossilOrigin-Name: 542dc4c5eb87017fe03b6c181e779993aa84564785e1177ccf937d52f985593b
This commit is contained in:
drh
2017-05-27 22:42:36 +00:00
parent 14e845a9d4
commit ae2ac854b3
3 changed files with 10 additions and 10 deletions

View File

@@ -815,9 +815,9 @@ static int vdbeSorterCompareText(
int n2;
int res;
getVarint32(&p1[1], n1); n1 = (n1 - 13) / 2;
getVarint32(&p2[1], n2); n2 = (n2 - 13) / 2;
res = memcmp(v1, v2, MIN(n1, n2));
getVarint32(&p1[1], n1);
getVarint32(&p2[1], n2);
res = memcmp(v1, v2, (MIN(n1, n2) - 13)/2);
if( res==0 ){
res = n1 - n2;
}