In the VDBE loop, only check for OOM errors at jumps rather than after every
opcode, for about a 0.5% performance increase. FossilOrigin-Name: 632071bac5ff324a74cec9bdbba2deb60c0945e9
This commit is contained in:
parent
eb715c62f9
commit
fabe393da8
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Improve\sperformance\sof\sfts5\sprefix\squeries\son\sdetail=col\stables.
|
||||
D 2016-02-03T20:04:59.805
|
||||
C In\sthe\sVDBE\sloop,\sonly\scheck\sfor\sOOM\serrors\sat\sjumps\srather\sthan\safter\severy\nopcode,\sfor\sabout\sa\s0.5%\sperformance\sincrease.
|
||||
D 2016-02-03T22:14:38.812
|
||||
F Makefile.in 027c1603f255390c43a426671055a31c0a65fdb4
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 72b7858f02017611c3ac1ddc965251017fed0845
|
||||
@ -413,7 +413,7 @@ F src/update.c 17332f9fe818cbc0444c36a811800af8498af4c3
|
||||
F src/utf.c 10cc2519e82e3369344d0969ad4b1a333dc86d18
|
||||
F src/util.c 72d40df0a52d3f30b462a15f0e094fcbade6dc82
|
||||
F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701
|
||||
F src/vdbe.c 16ca0c1e2975fac04c3ea5c62b34dc24b13fea13
|
||||
F src/vdbe.c f0c2e2fb8cbff761ea8602058406c151b9325e8d
|
||||
F src/vdbe.h 7a733ea8aac1b77305a67698e784fa3484ee3337
|
||||
F src/vdbeInt.h 4b69d5451bcadd473e745af53ef1e8abfdce0a79
|
||||
F src/vdbeapi.c 9d640d5efd9a140a6bda8da53b220aa258167993
|
||||
@ -1423,7 +1423,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P ef252bc4b59d272460aaebdc0d4b8e347b0d25a8
|
||||
R 671ea22942ad2d2bcb9568b9e59d452e
|
||||
U dan
|
||||
Z 34c6688fd340fcbe0aee4e43e23acf72
|
||||
P ca11f46db047e7f131cef3893f73824758a2076b
|
||||
R 59ea01ed7c88b6674116d0bfaf73cf15
|
||||
U drh
|
||||
Z 96f5f7409c64154023cc6759eed6c5b3
|
||||
|
@ -1 +1 @@
|
||||
ca11f46db047e7f131cef3893f73824758a2076b
|
||||
632071bac5ff324a74cec9bdbba2deb60c0945e9
|
@ -629,7 +629,6 @@ int sqlite3VdbeExec(
|
||||
#endif
|
||||
for(pOp=&aOp[p->pc]; rc==SQLITE_OK; pOp++){
|
||||
assert( pOp>=aOp && pOp<&aOp[p->nOp]);
|
||||
if( db->mallocFailed ) goto no_mem;
|
||||
#ifdef VDBE_PROFILE
|
||||
start = sqlite3Hwtime();
|
||||
#endif
|
||||
@ -754,14 +753,16 @@ jump_to_p2_and_check_for_interrupt:
|
||||
/* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev,
|
||||
** OP_VNext, OP_RowSetNext, or OP_SorterNext) all jump here upon
|
||||
** completion. Check to see if sqlite3_interrupt() has been called
|
||||
** or if the progress callback needs to be invoked.
|
||||
** or if the progress callback needs to be invoked. Also check for
|
||||
** OOM conditions and abort if seen.
|
||||
**
|
||||
** This code uses unstructured "goto" statements and does not look clean.
|
||||
** But that is not due to sloppy coding habits. The code is written this
|
||||
** way for performance, to avoid having to run the interrupt and progress
|
||||
** checks on every opcode. This helps sqlite3_step() to run about 1.5%
|
||||
** checks on every opcode. This helps sqlite3_step() to run over 2.0%
|
||||
** faster according to "valgrind --tool=cachegrind" */
|
||||
check_for_interrupt:
|
||||
if( db->mallocFailed ) goto no_mem;
|
||||
if( db->u1.isInterrupted ) goto abort_due_to_interrupt;
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
/* Call the progress callback if it is configured and the required number
|
||||
|
Loading…
x
Reference in New Issue
Block a user