Minor changes to the core of OP_Column for performance and to clarify the

critical path.

FossilOrigin-Name: 868394761e41b7483a5874426ee052dfb3a9e2be
This commit is contained in:
drh 2012-03-28 16:14:50 +00:00
parent dda5c08bf6
commit ac5e749be8
3 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Improvements\sto\scomments.\s\sMinor\schanges\sto\scode\sin\sthe\shot\spath\sof\nOP_Column\s-\swith\sthe\shope\sof\sget\sa\sfew\scycles\sof\sperformance\simprovement.
D 2012-03-28T13:41:10.884
C Minor\schanges\sto\sthe\score\sof\sOP_Column\sfor\sperformance\sand\sto\sclarify\sthe\ncritical\spath.
D 2012-03-28T16:14:50.602
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -240,7 +240,7 @@ F src/update.c d3076782c887c10e882996550345da9c4c9f9dea
F src/utf.c 890c67dcfcc7a74623c95baac7535aadfe265e84
F src/util.c 4f6cfad661b2e3454b0cdd5b1b9d39a54942d0e3
F src/vacuum.c bfd53f9bd20a8fdb70b0fa8e77182b866875c0d8
F src/vdbe.c 807532457744a264d19e929b2075dbec90d2a36d
F src/vdbe.c 8913926230bfc9d183fcd44e3d023c6d393b6548
F src/vdbe.h 18f581cac1f4339ec3299f3e0cc6e11aec654cdb
F src/vdbeInt.h 6ff4180a05683566a8835d12f7ec504b22932c82
F src/vdbeapi.c 3662b6a468a2a4605a15dfab313baa6dff81ad91
@ -993,7 +993,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P d095fa4bfabd765c8e935ed227a334161097dd34
R 78ef170f6dad0ba0a0f49e941cd533cb
P ca093103437f141caa3eb11539c6eb7b4dd65175
R 14c36b139bb9a241f9fc5fc1fa96e28f
U drh
Z 6f108b9c2dd42e83ba81e7472cbc6ad3
Z 95f518d28e036a56a444945b5630fdfa

View File

@ -1 +1 @@
ca093103437f141caa3eb11539c6eb7b4dd65175
868394761e41b7483a5874426ee052dfb3a9e2be

View File

@ -2381,11 +2381,12 @@ case OP_Column: {
if( aOffset[p2] ){
assert( rc==SQLITE_OK );
if( zRec ){
/* This is the common case where the whole row fits on a single page */
VdbeMemRelease(pDest);
sqlite3VdbeSerialGet((u8 *)&zRec[aOffset[p2]], aType[p2], pDest);
}else{
/* This branch happens only when the row overflows onto multiple pages */
t = aType[p2];
len = sqlite3VdbeSerialTypeLen(t);
if( (pOp->p5 & (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG))!=0
&& ((t>=12 && (t&1)==0) || (pOp->p5 & OPFLAG_TYPEOFARG)!=0)
){
@ -2396,6 +2397,7 @@ case OP_Column: {
** will work for everything else. */
zData = t<12 ? (char*)&payloadSize64 : 0;
}else{
len = sqlite3VdbeSerialTypeLen(t);
sqlite3VdbeMemMove(&sMem, pDest);
rc = sqlite3VdbeMemFromBtree(pCrsr, aOffset[p2], len, pC->isIndex,
&sMem);