Another improvement to OP_Function and an improvement to OP_Move.

FossilOrigin-Name: 70b056fb6f60cdfbe24e4b77a1770eef064a73c6
This commit is contained in:
drh 2013-11-21 04:18:31 +00:00
parent 76694c3ae5
commit e09f43f8b7
3 changed files with 13 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C A\ssimple\schange\sto\sthe\sOP_Function\sopcode\simproves\soverall\sperformance\sby\nabout\s0.5%. C Another\simprovement\sto\sOP_Function\sand\san\simprovement\sto\sOP_Move.
D 2013-11-21T03:43:12.554 D 2013-11-21T04:18:31.892
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1 F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -280,7 +280,7 @@ F src/update.c c05a0ee658f1a149e0960dfd110f3b8bd846bcb0
F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269 F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269
F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918 F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918
F src/vacuum.c 3728d74919d4fb1356f9e9a13e27773db60b7179 F src/vacuum.c 3728d74919d4fb1356f9e9a13e27773db60b7179
F src/vdbe.c 9d8490d65b06d2e21dd0f0e6286c07e7f3095a48 F src/vdbe.c bfbbaf9daddfd0228747e4e47677bd34dc306388
F src/vdbe.h c06f0813f853566457ce9cfb1a4a4bc39a5da644 F src/vdbe.h c06f0813f853566457ce9cfb1a4a4bc39a5da644
F src/vdbeInt.h 0ac03c790b8ea4568b747550ba9bbf92a8e8feb2 F src/vdbeInt.h 0ac03c790b8ea4568b747550ba9bbf92a8e8feb2
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
@ -1140,7 +1140,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
P ecaac28a2e78aca148fc614fe54bf2706aed8be2 P b890eefd57fbd189f7df611e82eb1fb4b197e1c3
R 33f1c98c35afb745f70ac2d0738f01fc R f453cb4528248c0309ea050c9ba4ca77
U drh U drh
Z a8c7ba243cd2d2fb4fb7b6cf27c27770 Z 2b2e2a3a32727285c9b4dfbebd948b02

View File

@ -1 +1 @@
b890eefd57fbd189f7df611e82eb1fb4b197e1c3 70b056fb6f60cdfbe24e4b77a1770eef064a73c6

View File

@ -1081,15 +1081,15 @@ case OP_Move: {
int p1; /* Register to copy from */ int p1; /* Register to copy from */
int p2; /* Register to copy to */ int p2; /* Register to copy to */
n = pOp->p3 + 1; n = pOp->p3;
p1 = pOp->p1; p1 = pOp->p1;
p2 = pOp->p2; p2 = pOp->p2;
assert( n>0 && p1>0 && p2>0 ); assert( n>=0 && p1>0 && p2>0 );
assert( p1+n<=p2 || p2+n<=p1 ); assert( p1+n<=p2 || p2+n<=p1 );
pIn1 = &aMem[p1]; pIn1 = &aMem[p1];
pOut = &aMem[p2]; pOut = &aMem[p2];
while( n-- ){ do{
assert( pOut<=&aMem[(p->nMem-p->nCursor)] ); assert( pOut<=&aMem[(p->nMem-p->nCursor)] );
assert( pIn1<=&aMem[(p->nMem-p->nCursor)] ); assert( pIn1<=&aMem[(p->nMem-p->nCursor)] );
assert( memIsValid(pIn1) ); assert( memIsValid(pIn1) );
@ -1106,7 +1106,7 @@ case OP_Move: {
REGISTER_TRACE(p2++, pOut); REGISTER_TRACE(p2++, pOut);
pIn1++; pIn1++;
pOut++; pOut++;
} }while( n-- );
break; break;
} }
@ -1532,7 +1532,8 @@ case OP_Function: {
/* Copy the result of the function into register P3 */ /* Copy the result of the function into register P3 */
sqlite3VdbeChangeEncoding(&ctx.s, encoding); sqlite3VdbeChangeEncoding(&ctx.s, encoding);
sqlite3VdbeMemMove(pOut, &ctx.s); assert( pOut->flags==MEM_Null );
memcpy(pOut, &ctx.s, sizeof(Mem));
if( sqlite3VdbeMemTooBig(pOut) ){ if( sqlite3VdbeMemTooBig(pOut) ){
goto too_big; goto too_big;
} }