From: drh Date: Wed, 17 Sep 2014 23:37:38 +0000 (+0000) Subject: Performance improvement and slight size reduction to the comparison operators X-Git-Tag: version-3.8.7~107^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca5506bdc482bbfde2fe3dd6a93f079e9801ce60;p=thirdparty%2Fsqlite.git Performance improvement and slight size reduction to the comparison operators in the VDBE. FossilOrigin-Name: 14052a7d088bed8196d90a3361ce717a5193bdc8 --- diff --git a/manifest b/manifest index 369f641908..12094ebf72 100644 --- a/manifest +++ b/manifest @@ -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. -D 2014-09-17T16:41:15.094 +C Performance\simprovement\sand\sslight\ssize\sreduction\sto\sthe\scomparison\soperators\nin\sthe\sVDBE. +D 2014-09-17T23:37:39.000 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -288,7 +288,7 @@ F src/update.c 729f6f18fc27740591d085e1172cebe311144bf0 F src/utf.c 8f634b93d41c089029dd503161a7d3e685d59a9c F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8 F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a -F src/vdbe.c d3c548ad4ea6a5549d2d0b502070e0523023ff97 +F src/vdbe.c 78606777e4ce5dba147ab75e71c0127b0d8d4c3d F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327 F src/vdbeInt.h f90b0de6153f50de630a5a113537efb47083812f F src/vdbeapi.c c6e63f913bcb12977731a8b12e7e5c5762981527 @@ -1198,7 +1198,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 4e437844322cc20eef92928b53fa6b37eded586e -R 8244691fd19236cfb5e445e4012669fa +P fdddb477c89dabb9f7bf2d5ccb32534868df3a03 +R 27b98108123b0758f30cbbc4e2693ca1 U drh -Z ef23a1637c5e3046b6cead80453b022e +Z 7dd9c2f8b2084fea7b27f362515d2b5a diff --git a/manifest.uuid b/manifest.uuid index 2cf0d22ed7..2a5acf5d23 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -fdddb477c89dabb9f7bf2d5ccb32534868df3a03 \ No newline at end of file +14052a7d088bed8196d90a3361ce717a5193bdc8 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 5ab14c5cbf..f964a73878 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -1911,8 +1911,14 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ } assert( pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0 ); - ExpandBlob(pIn1); - ExpandBlob(pIn3); + if( pIn1->flags & MEM_Zero ){ + sqlite3VdbeMemExpandBlob(pIn1); + flags1 &= ~MEM_Zero; + } + if( pIn3->flags & MEM_Zero ){ + sqlite3VdbeMemExpandBlob(pIn3); + flags3 &= ~MEM_Zero; + } res = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl); } 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. */ - pIn1->flags = (pIn1->flags&~MEM_TypeMask) | (flags1&MEM_TypeMask); - pIn3->flags = (pIn3->flags&~MEM_TypeMask) | (flags3&MEM_TypeMask); + pIn1->flags = flags1; + pIn3->flags = flags3; break; }