Performance improvement and slight size reduction to the comparison operators

in the VDBE.

FossilOrigin-Name: 14052a7d088bed8196d90a3361ce717a5193bdc8
This commit is contained in:
drh 2014-09-17 23:37:38 +00:00
parent d3b74200a8
commit ca5506bdc4
3 changed files with 17 additions and 11 deletions

View File

@ -1,5 +1,5 @@
C In\sthe\sMem\sobject,\sstop\srequiring\sthat\sMem.xDel\sbe\sNULL\swhen\sthe\sMEM_Dyn\nbit\sis\sclear.\s\sAlso\sreduce\sthe\samount\sof\sinitialization\sof\sMem\sobjects.\nAll\sfor\sa\ssmall\ssize\sreduction\sand\sperformance\sincrease. C Performance\simprovement\sand\sslight\ssize\sreduction\sto\sthe\scomparison\soperators\nin\sthe\sVDBE.
D 2014-09-17T16:41:15.094 D 2014-09-17T23:37:39.000
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -288,7 +288,7 @@ F src/update.c 729f6f18fc27740591d085e1172cebe311144bf0
F src/utf.c 8f634b93d41c089029dd503161a7d3e685d59a9c F src/utf.c 8f634b93d41c089029dd503161a7d3e685d59a9c
F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8 F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8
F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a
F src/vdbe.c d3c548ad4ea6a5549d2d0b502070e0523023ff97 F src/vdbe.c 78606777e4ce5dba147ab75e71c0127b0d8d4c3d
F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327 F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327
F src/vdbeInt.h f90b0de6153f50de630a5a113537efb47083812f F src/vdbeInt.h f90b0de6153f50de630a5a113537efb47083812f
F src/vdbeapi.c c6e63f913bcb12977731a8b12e7e5c5762981527 F src/vdbeapi.c c6e63f913bcb12977731a8b12e7e5c5762981527
@ -1198,7 +1198,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 4e437844322cc20eef92928b53fa6b37eded586e P fdddb477c89dabb9f7bf2d5ccb32534868df3a03
R 8244691fd19236cfb5e445e4012669fa R 27b98108123b0758f30cbbc4e2693ca1
U drh U drh
Z ef23a1637c5e3046b6cead80453b022e Z 7dd9c2f8b2084fea7b27f362515d2b5a

View File

@ -1 +1 @@
fdddb477c89dabb9f7bf2d5ccb32534868df3a03 14052a7d088bed8196d90a3361ce717a5193bdc8

View File

@ -1911,8 +1911,14 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
} }
assert( pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0 ); assert( pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0 );
ExpandBlob(pIn1); if( pIn1->flags & MEM_Zero ){
ExpandBlob(pIn3); sqlite3VdbeMemExpandBlob(pIn1);
flags1 &= ~MEM_Zero;
}
if( pIn3->flags & MEM_Zero ){
sqlite3VdbeMemExpandBlob(pIn3);
flags3 &= ~MEM_Zero;
}
res = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl); res = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl);
} }
switch( pOp->opcode ){ switch( pOp->opcode ){
@ -1937,8 +1943,8 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
} }
} }
/* Undo any changes made by applyAffinity() to the input registers. */ /* Undo any changes made by applyAffinity() to the input registers. */
pIn1->flags = (pIn1->flags&~MEM_TypeMask) | (flags1&MEM_TypeMask); pIn1->flags = flags1;
pIn3->flags = (pIn3->flags&~MEM_TypeMask) | (flags3&MEM_TypeMask); pIn3->flags = flags3;
break; break;
} }