Remove the peep-hole optimization of removing OP_Close opcodes that come
before OP_Halt, as the extra work of removing those opcodes uses more cycles than just running them. FossilOrigin-Name: 984a96d79656c1b095aba1f88aca4bb787ba0bd8
This commit is contained in:
parent
42735c7d30
commit
2831c4d123
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Size\sand\sperformance\soptimization\sto\ssqlite3ValueFromExpr()
|
||||
D 2016-09-29T19:27:16.222
|
||||
C Remove\sthe\speep-hole\soptimization\sof\sremoving\sOP_Close\sopcodes\sthat\scome\nbefore\sOP_Halt,\sas\sthe\sextra\swork\sof\sremoving\sthose\sopcodes\suses\smore\scycles\nthan\sjust\srunning\sthem.
|
||||
D 2016-09-29T19:50:02.416
|
||||
F Makefile.in 6fd48ffcf7c2deea7499062d1f3747f986c19678
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 5151cc64c4c05f3455f4f692ad11410a810d937f
|
||||
@ -332,7 +332,7 @@ F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
|
||||
F src/btree.c 56e1732ecfb3731efcb216266ec26b1b96e5e8c9
|
||||
F src/btree.h d05b2fcc290991a8a3d9ea1816ddd55a4359dcde
|
||||
F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5
|
||||
F src/build.c 9a1f228cfa0aec70e2b4eba1fcf141ca4b499f6e
|
||||
F src/build.c ab95712203bfbd83d65c878934201624f778e469
|
||||
F src/callback.c 2e76147783386374bf01b227f752c81ec872d730
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7
|
||||
@ -391,7 +391,7 @@ F src/shell.c b80396d2fadce4681397707e30078bf416e1dec2
|
||||
F src/sqlite.h.in 2683a291ed8db5228024267be6421f0de507b80e
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 8648034aa702469afb553231677306cc6492a1ae
|
||||
F src/sqliteInt.h 1137559f2e6f4e55d26ec83ce94ef57aa3748c8f
|
||||
F src/sqliteInt.h 2599e8cc7e74733bd980b1c58712f975f914ef01
|
||||
F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
|
||||
F src/status.c a9e66593dfb28a9e746cba7153f84d49c1ddc4b1
|
||||
F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
|
||||
@ -457,7 +457,7 @@ F src/vdbe.c 6781329737f4bb140834cd32b15e93b83d60858e
|
||||
F src/vdbe.h c044be7050ac6bf596eecc6ab159f5dbc020a3b7
|
||||
F src/vdbeInt.h 581b737c2f6e413c555469480efe31796a71bcad
|
||||
F src/vdbeapi.c 794f80669e9e3b9b3edc78d80c15968985c7bf21
|
||||
F src/vdbeaux.c b9772e4134a17f5b42d32761f5119467815c2458
|
||||
F src/vdbeaux.c 2fc9c59009dfb63732c2c89b18aaeb3ca172f7b3
|
||||
F src/vdbeblob.c 3e82a797b60c3b9fed7b8de8c539ca7607874937
|
||||
F src/vdbemem.c 1b8d5b770a9a3c6d8ed3463104a382bffa6f15c2
|
||||
F src/vdbesort.c 91fda3909326860382b0ca8aa251e609c6a9d62c
|
||||
@ -1525,7 +1525,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 e2cd79aa3104c51035bf29c548c322564731b75f
|
||||
R ced10222d4b6fcbb24f085bf78455885
|
||||
P 945f82bc44c5a431c0fef0d36cf016671d7ade1e
|
||||
R 20b3d4fe5709ed2dfc36e6f20fdfd324
|
||||
U drh
|
||||
Z 527ba3ca85dfce0ba6019f348119d7e0
|
||||
Z e13d1f1073df22720e2a91e1bec2d09c
|
||||
|
@ -1 +1 @@
|
||||
945f82bc44c5a431c0fef0d36cf016671d7ade1e
|
||||
984a96d79656c1b095aba1f88aca4bb787ba0bd8
|
@ -146,7 +146,6 @@ void sqlite3FinishCoding(Parse *pParse){
|
||||
assert( !pParse->isMultiWrite
|
||||
|| sqlite3VdbeAssertMayAbort(v, pParse->mayAbort));
|
||||
if( v ){
|
||||
while( sqlite3VdbeDeletePriorOpcode(v, OP_Close) ){}
|
||||
sqlite3VdbeAddOp0(v, OP_Halt);
|
||||
|
||||
#if SQLITE_USER_AUTHENTICATION
|
||||
|
@ -2899,7 +2899,6 @@ struct Parse {
|
||||
int nSet; /* Number of sets used so far */
|
||||
int nOpAlloc; /* Number of slots allocated for Vdbe.aOp[] */
|
||||
int szOpAlloc; /* Bytes of memory space allocated for Vdbe.aOp[] */
|
||||
int iFixedOp; /* Never back out opcodes iFixedOp-1 or earlier */
|
||||
int ckBase; /* Base register of data during check constraints */
|
||||
int iSelfTab; /* Table of an index whose exprs are being coded */
|
||||
int iCacheLevel; /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
|
||||
|
@ -374,7 +374,6 @@ void sqlite3VdbeResolveLabel(Vdbe *v, int x){
|
||||
if( p->aLabel ){
|
||||
p->aLabel[j] = v->nOp;
|
||||
}
|
||||
p->iFixedOp = v->nOp - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -773,7 +772,6 @@ void sqlite3VdbeChangeP5(Vdbe *p, u8 p5){
|
||||
** the address of the next instruction to be coded.
|
||||
*/
|
||||
void sqlite3VdbeJumpHere(Vdbe *p, int addr){
|
||||
p->pParse->iFixedOp = p->nOp - 1;
|
||||
sqlite3VdbeChangeP2(p, addr, p->nOp);
|
||||
}
|
||||
|
||||
@ -896,7 +894,7 @@ int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
|
||||
** then remove it. Return true if and only if an opcode was removed.
|
||||
*/
|
||||
int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){
|
||||
if( (p->nOp-1)>(p->pParse->iFixedOp) && p->aOp[p->nOp-1].opcode==op ){
|
||||
if( p->nOp>0 && p->aOp[p->nOp-1].opcode==op ){
|
||||
return sqlite3VdbeChangeToNoop(p, p->nOp-1);
|
||||
}else{
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user