1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Reorder the terms of a conditional for a small performance gain.

FossilOrigin-Name: d67b0ed1054cbb7ea2cdd74720d4d6e0227cec14
This commit is contained in:
drh
2015-06-25 16:01:44 +00:00
parent ae6cd72318
commit e674bf1648
3 changed files with 8 additions and 8 deletions

View File

@@ -1457,7 +1457,7 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
testcase( gap+2==top );
testcase( gap+1==top );
testcase( gap==top );
if( gap+2<=top && (data[hdr+1] || data[hdr+2]) ){
if( (data[hdr+2] || data[hdr+1]) && gap+2<=top ){
int bDefrag = 0;
u8 *pSpace = pageFindSlot(pPage, nByte, &rc, &bDefrag);
if( rc ) return rc;