Remove an unnecessary local variable from OP_Column, for a small size
reduction and performance increase. FossilOrigin-Name: 39543903282409ad3f139f8a0bb376661e7595a33af4f647945b1513a028ccb4
This commit is contained in:
parent
95b225a46d
commit
1f613c4df3
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Performance\simprovement\sin\sthe\sOP_Column\sopcode.
|
||||
D 2017-08-16T11:04:22.469
|
||||
C Remove\san\sunnecessary\slocal\svariable\sfrom\sOP_Column,\sfor\sa\ssmall\ssize\nreduction\sand\sperformance\sincrease.
|
||||
D 2017-08-16T14:16:19.879
|
||||
F Makefile.in d9873c9925917cca9990ee24be17eb9613a668012c85a343aef7e5536ae266e8
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 02b469e9dcd5b7ee63fc1fb05babc174260ee4cfa4e0ef2e48c3c6801567a016
|
||||
@ -522,7 +522,7 @@ F src/update.c 5404be9e840717323a69209190cdbc9d0d34adaedaaf1d1a1069babf2c4171c0
|
||||
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
||||
F src/util.c fc081ec6f63448dcd80d3dfad35baecfa104823254a815b081a4d9fe76e1db23
|
||||
F src/vacuum.c 90839322fd5f00df9617eb21b68beda9b6e2a2937576b0d65985e4aeb1c53739
|
||||
F src/vdbe.c 8530c38ffc19400cf9634d2e55b9c6141d276350e6ea6d99a003cd6963fbf20a
|
||||
F src/vdbe.c c8e7bec8764b26b8e80fadffab2b9c18e8ed5ab2e92d1be5a7aebeed18ca8be5
|
||||
F src/vdbe.h d50cadf12bcf9fb99117ef392ce1ea283aa429270481426b6e8b0280c101fd97
|
||||
F src/vdbeInt.h ff2b7db0968d20e6184aee256d2e535d565f5a172e3588a78adb166a41fc4911
|
||||
F src/vdbeapi.c 05d6b14ab73952db0d73f6452d6960216997bd966a710266b2fe051f25326abc
|
||||
@ -1647,7 +1647,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 2cf3f3de8a48465bd6b0af7763bfe905f3bb0151488f63c9ecc3147bcb345094
|
||||
R 1db09713c9077dbfc76327c90333340a
|
||||
P dc98a92f32511ee322b0207bd286e967248a8e59b418f11168eb31e34b0fa0fa
|
||||
R 8dc9658e95fe266a68d077704d4afe1a
|
||||
U drh
|
||||
Z 65fa1f244e3ef6aef2172aa886d1ccda
|
||||
Z 4fdaa02107e5a271b3b6d501790c7a7c
|
||||
|
@ -1 +1 @@
|
||||
dc98a92f32511ee322b0207bd286e967248a8e59b418f11168eb31e34b0fa0fa
|
||||
39543903282409ad3f139f8a0bb376661e7595a33af4f647945b1513a028ccb4
|
14
src/vdbe.c
14
src/vdbe.c
@ -2386,7 +2386,6 @@ case OP_Column: {
|
||||
const u8 *zData; /* Part of the record being decoded */
|
||||
const u8 *zHdr; /* Next unparsed byte of the header */
|
||||
const u8 *zEndHdr; /* Pointer to first byte after the header */
|
||||
u32 offset; /* Offset into the data */
|
||||
u64 offset64; /* 64-bit offset */
|
||||
u32 t; /* A type code from the record header */
|
||||
Mem *pReg; /* PseudoTable input register */
|
||||
@ -2438,12 +2437,11 @@ case OP_Column: {
|
||||
}
|
||||
}
|
||||
pC->cacheStatus = p->cacheCtr;
|
||||
pC->iHdrOffset = getVarint32(pC->aRow, offset);
|
||||
pC->iHdrOffset = getVarint32(pC->aRow, aOffset[0]);
|
||||
pC->nHdrParsed = 0;
|
||||
aOffset[0] = offset;
|
||||
|
||||
|
||||
if( pC->szRow<offset ){ /*OPTIMIZATION-IF-FALSE*/
|
||||
if( pC->szRow<aOffset[0] ){ /*OPTIMIZATION-IF-FALSE*/
|
||||
/* pC->aRow does not have to hold the entire row, but it does at least
|
||||
** need to cover the header of the record. If pC->aRow does not contain
|
||||
** the complete header, then set it to zero, forcing the header to be
|
||||
@ -2460,7 +2458,7 @@ case OP_Column: {
|
||||
** 3-byte type for each of the maximum of 32768 columns plus three
|
||||
** extra bytes for the header length itself. 32768*3 + 3 = 98307.
|
||||
*/
|
||||
if( offset > 98307 || offset > pC->payloadSize ){
|
||||
if( aOffset[0] > 98307 || aOffset[0] > pC->payloadSize ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
@ -2469,9 +2467,9 @@ case OP_Column: {
|
||||
** (ex: pC->nHdrParsed<=p2) in the next section, we achieve a
|
||||
** measurable performance gain.
|
||||
**
|
||||
** This branch is taken even if offset==0. Such a record is never
|
||||
** This branch is taken even if aOffset[0]==0. Such a record is never
|
||||
** generated by SQLite, and could be considered corruption, but we
|
||||
** accept it for historical reasons. When offset==0, the code this
|
||||
** accept it for historical reasons. When aOffset[0]==0, the code this
|
||||
** branch jumps to reads past the end of the record, but never more
|
||||
** than a few bytes. Even if the record occurs at the end of the page
|
||||
** content area, the "page header" comes after the page content and so
|
||||
@ -2480,7 +2478,7 @@ case OP_Column: {
|
||||
*/
|
||||
zData = pC->aRow;
|
||||
assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */
|
||||
testcase( offset==0 );
|
||||
testcase( aOffset[0]==0 );
|
||||
goto op_column_read_header;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user