Small performance improvement on sqlite3BtreeMoveto. (CVS 2934)
FossilOrigin-Name: c780152f3cff9c0a13d231935ae3c2e2d28b4460
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
C Add\sa\shigh-speed\sversion\sof\ssqlite3GetVarint32\sto\svdbe.c\sfor\sa\s3%\sperformance\ngain.\s(CVS\s2933)
|
||||
D 2006-01-13T01:48:59
|
||||
C Small\sperformance\simprovement\son\ssqlite3BtreeMoveto.\s(CVS\s2934)
|
||||
D 2006-01-13T02:35:10
|
||||
F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
|
||||
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@@ -34,7 +34,7 @@ F src/alter.c 4139c8f1d0f12b1759e767b1d09dd594e2b5ac1d
|
||||
F src/analyze.c 7d2b7ab9a9c2fd6e55700f69064dfdd3e36d7a8a
|
||||
F src/attach.c d4b9d8bd71d72409720946355be41cafb6c09079
|
||||
F src/auth.c cdec356a5cd8b217c346f816c5912221537fe87f
|
||||
F src/btree.c fdbb411805bf0c0087784a4daf95b4de1b469978
|
||||
F src/btree.c 51b54ae0182d6b2cf129bc98064f5a2c4ed30ab9
|
||||
F src/btree.h 5663c4f43e8521546ccebc8fc95acb013b8f3184
|
||||
F src/build.c a055974683ddc465bdc8669d43d6ab35d3dbb55f
|
||||
F src/callback.c ba3e6cc7a6beb562e7a66f92e26fabcb21aab1e2
|
||||
@@ -340,7 +340,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P ace8ba817766f9da270cd7f06b68cc537768a8be
|
||||
R 4f16d865eb1a68e0be85977f1ba457c6
|
||||
P a64e8251a606fb2c298d7d804f3964a9155c73c5
|
||||
R 88c254e780b2ea9454333fd58253e3cf
|
||||
U drh
|
||||
Z a443a150c79d39fb2ce3f4a546cc3706
|
||||
Z cf8b778aba2aa976f9c38e986b5a01cc
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
a64e8251a606fb2c298d7d804f3964a9155c73c5
|
||||
c780152f3cff9c0a13d231935ae3c2e2d28b4460
|
||||
+4
-6
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.293 2006/01/12 15:01:16 drh Exp $
|
||||
** $Id: btree.c,v 1.294 2006/01/13 02:35:10 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** For a detailed discussion of BTrees, refer to
|
||||
@@ -2901,8 +2901,7 @@ static int getPayload(
|
||||
pageIntegrity(pPage);
|
||||
assert( pCur->idx>=0 && pCur->idx<pPage->nCell );
|
||||
getCellInfo(pCur);
|
||||
aPayload = pCur->info.pCell;
|
||||
aPayload += pCur->info.nHeader;
|
||||
aPayload = pCur->info.pCell + pCur->info.nHeader;
|
||||
if( pPage->intKey ){
|
||||
nKey = 0;
|
||||
}else{
|
||||
@@ -3326,6 +3325,7 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){
|
||||
void *pCellKey;
|
||||
i64 nCellKey;
|
||||
pCur->idx = (lwr+upr)/2;
|
||||
pCur->info.nSize = 0;
|
||||
if( pPage->intKey ){
|
||||
u8 *pCell = findCell(pPage, pCur->idx);
|
||||
pCell += pPage->childPtrSize;
|
||||
@@ -3334,7 +3334,6 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){
|
||||
pCell += getVarint32(pCell, &dummy);
|
||||
}
|
||||
getVarint(pCell, &nCellKey);
|
||||
pCur->info.nSize = 0;
|
||||
if( nCellKey<nKey ){
|
||||
c = -1;
|
||||
}else if( nCellKey>nKey ){
|
||||
@@ -3344,9 +3343,8 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){
|
||||
}
|
||||
}else{
|
||||
int available;
|
||||
parseCell(pPage, pCur->idx, &pCur->info);
|
||||
nCellKey = pCur->info.nKey;
|
||||
pCellKey = (void *)fetchPayload(pCur, &available, 0);
|
||||
nCellKey = pCur->info.nKey;
|
||||
if( available>=nCellKey ){
|
||||
c = pCur->xCompare(pCur->pArg, nCellKey, pCellKey, nKey, pKey);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user