From: drh Date: Mon, 13 Oct 2014 20:12:47 +0000 (+0000) Subject: Use the padding word in the Mem object as temporary storage for X-Git-Tag: version-3.8.7~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=facf47a891b114635ef5a5c2ea76ba1f8981e1c6;p=thirdparty%2Fsqlite.git Use the padding word in the Mem object as temporary storage for serial_type value in OP_Record, and thus avoid a redundant computation of the serial_type for each column. FossilOrigin-Name: 4b3b65ee5ea61e9b9671ca027940bf02689cb890 --- diff --git a/manifest b/manifest index f76c05d5cd..cdda42bff1 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Three\ssmall\soptimizations\sto\svdbeaux.c. -D 2014-10-13T17:42:05.891 +C Use\sthe\spadding\sword\sin\sthe\sMem\sobject\sas\stemporary\sstorage\sfor\nserial_type\svalue\sin\sOP_Record,\sand\sthus\savoid\sa\sredundant\scomputation\sof\nthe\sserial_type\sfor\seach\scolumn. +D 2014-10-13T20:12:47.457 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -289,9 +289,9 @@ F src/update.c 729f6f18fc27740591d085e1172cebe311144bf0 F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8 F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a -F src/vdbe.c cf7c24e531aad047689e4235a66b22526e765e46 +F src/vdbe.c 8755e3bb0d7d26b2b156c6f29ddd6b3d32b77df2 F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327 -F src/vdbeInt.h 90c0ae53382d16a4f77ad5a9c4b3e35278e9e061 +F src/vdbeInt.h e2a060a55ee18a6ab973353a5e2ec7ee569bf787 F src/vdbeapi.c 37a6c6ae284a97bcace365f2f0a225680c0499d9 F src/vdbeaux.c edbb7a9c8b2a8f7a68ac75c2475edd4040266b76 F src/vdbeblob.c 848238dc73e93e48432991bb5651bf87d865eca4 @@ -1204,7 +1204,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 c2799aece17d347c64217a0e407bb10e50c184a3 -R f9a2ff50dcb19a8595444c5c4cad6f5f +P 04892f8ba6c55cec4fe37bfe59b6349fd2a40698 +R b0e17ef60b5aa0edd0fe18cf5fe3de58 U drh -Z bf4e3c223808aa3476302aafe1aa8090 +Z 6462e46ba313ee1bcf094c3a26197f24 diff --git a/manifest.uuid b/manifest.uuid index 02b54f919a..8d0a012b7d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -04892f8ba6c55cec4fe37bfe59b6349fd2a40698 \ No newline at end of file +4b3b65ee5ea61e9b9671ca027940bf02689cb890 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 7e0e35fb0e..049bf32ecd 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -2616,7 +2616,7 @@ case OP_MakeRecord: { pRec = pLast; do{ assert( memIsValid(pRec) ); - serial_type = sqlite3VdbeSerialType(pRec, file_format); + pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format); len = sqlite3VdbeSerialTypeLen(serial_type); if( pRec->flags & MEM_Zero ){ if( nData ){ @@ -2665,7 +2665,7 @@ case OP_MakeRecord: { assert( pData0<=pLast ); pRec = pData0; do{ - serial_type = sqlite3VdbeSerialType(pRec, file_format); + serial_type = pRec->uTemp; i += putVarint32(&zNewRecord[i], serial_type); /* serial type */ j += sqlite3VdbeSerialPut(&zNewRecord[j], pRec, serial_type); /* content */ }while( (++pRec)<=pLast ); diff --git a/src/vdbeInt.h b/src/vdbeInt.h index 1b27e88e72..bb504d64a1 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -175,7 +175,7 @@ struct Mem { /* ShallowCopy only needs to copy the information above */ char *zMalloc; /* Space to hold MEM_Str or MEM_Blob if szMalloc>0 */ int szMalloc; /* Size of the zMalloc allocation */ - int iPadding1; /* Padding for 8-byte alignment */ + u32 uTemp; /* Transient storage for serial_type in OP_MakeRecord */ sqlite3 *db; /* The associated database connection */ void (*xDel)(void*);/* Destructor for Mem.z - only valid if MEM_Dyn */ #ifdef SQLITE_DEBUG