From: drh Date: Wed, 16 Apr 2014 21:02:28 +0000 (+0000) Subject: Performance optimization on nodeGetCell() in R-Tree. X-Git-Tag: version-3.13.0~148^2~145^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18b5142b29d7fe828f17dd816c55b9fb5925ea85;p=thirdparty%2Fsqlite.git Performance optimization on nodeGetCell() in R-Tree. FossilOrigin-Name: 5d20ff9ec837ad35bc44d6c25d13764b350e81dd --- diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 9c62576612..6bf1db11c4 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -729,10 +729,15 @@ static void nodeGetCell( int iCell, /* Index of the cell within the node */ RtreeCell *pCell /* OUT: Write the cell contents here */ ){ - int ii; + u8 *pData; + u8 *pEnd; + RtreeCoord *pCoord; pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell); - for(ii=0; iinDim*2; ii++){ - nodeGetCoord(pRtree, pNode, iCell, ii, &pCell->aCoord[ii]); + pData = pNode->zData + (12 + pRtree->nBytesPerCell*iCell); + pEnd = pData + pRtree->nDim*8; + pCoord = pCell->aCoord; + for(; pData