1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

R-TREE optimization: unwrap the coordinate decode loop in

rtreeCallbackConstraint().

FossilOrigin-Name: 0bf7b51896ec441f62490964c7a44a3c75c6b7e2
This commit is contained in:
drh
2017-01-31 21:22:03 +00:00
parent a4613e1f4c
commit fcbd6cdb41
3 changed files with 14 additions and 11 deletions

View File

@ -966,10 +966,14 @@ static int rtreeCallbackConstraint(
if( pConstraint->op==RTREE_QUERY && pSearch->iLevel==1 ){
pInfo->iRowid = readInt64(pCellData);
}
assert( nCoord>=2 && (nCoord&1)==0 );
i = 0;
do{
pCellData += 8;
for(i=0; i<nCoord; i++, pCellData += 4){
RTREE_DECODE_COORD(eInt, pCellData, aCoord[i]);
}
RTREE_DECODE_COORD(eInt, (pCellData+4), aCoord[i+1]);
i+= 2;
}while( i<nCoord );
if( pConstraint->op==RTREE_MATCH ){
rc = pConstraint->u.xGeom((sqlite3_rtree_geometry*)pInfo,
nCoord, aCoord, &i);

View File

@ -1,5 +1,5 @@
C Very\ssmall\sperformance\simprovements\sand\ssize\sreductions\sin\s\nsqlite3VdbeExec()\sand\sblobSeekToRow().
D 2017-01-31T19:10:42.671
C R-TREE\soptimization:\sunwrap\sthe\scoordinate\sdecode\sloop\sin\nrtreeCallbackConstraint().
D 2017-01-31T21:22:03.245
F Makefile.in 5f415e7867296d678fed2e6779aea10c1318b4bc
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc b8ca53350ae545e3562403d5da2a69cec79308da
@ -264,7 +264,7 @@ F ext/rbu/sqlite3rbu.c bb0de6cdbdb14a7d55a097238a434b7e99caf318
F ext/rbu/sqlite3rbu.h 6fb6294c34a9ca93b5894a33bca530c6f08decba
F ext/rbu/test_rbu.c 5aa22616afac6f71ebd3d9bc9bf1006cfabcca88
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
F ext/rtree/rtree.c 078fc27417b48aaebe988621bf96ef0e1645b201
F ext/rtree/rtree.c 81fea8b100c6195f8a42119109d6ec2016e613f3
F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
F ext/rtree/rtree1.test 42dadfc7b44a436cd74a1bebc0b9b689e4eaf7ec
F ext/rtree/rtree2.test acbb3a4ce0f4fbc2c304d2b4b784cfa161856bba
@ -1549,8 +1549,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P b63deed600b1a457a6960ebad5645f4de9c56e5d 495ea824093ff535734c22c3115384c08f855c02
R 793d15c782afd1bb1c67c16147a858a7
T +closed 495ea824093ff535734c22c3115384c08f855c02
P 85dddf2b453b8afaf1f485b96084d31e22f97dda
R 80f20a76d631de95caa5095989ae297f
U drh
Z c7f2b5c04f4a8cad3ed5cf73468bb400
Z d89e7b06786861fbe2704ca06b1411f8

View File

@ -1 +1 @@
85dddf2b453b8afaf1f485b96084d31e22f97dda
0bf7b51896ec441f62490964c7a44a3c75c6b7e2