1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

More optimizations. (CVS 813)

FossilOrigin-Name: 5809132f5bf40bae2331f887e87fe5baecc15c46
This commit is contained in:
drh
2003-01-05 21:41:40 +00:00
parent c3b7057705
commit 8178a75a11
4 changed files with 71 additions and 54 deletions

View File

@@ -36,7 +36,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.189 2003/01/02 14:43:57 drh Exp $
** $Id: vdbe.c,v 1.190 2003/01/05 21:41:42 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -780,8 +780,7 @@ static AggElem *_AggInFocus(Agg *p){
**
** NULLs are converted into an empty string.
*/
#define Stringify(P,I) \
((P->aStack[I].flags & STK_Str)==0 ? hardStringify(P,I) : 0)
#define Stringify(P,I) ((aStack[I].flags & STK_Str)==0 ? hardStringify(P,I) : 0)
static int hardStringify(Vdbe *p, int i){
Stack *pStack = &p->aStack[i];
char **pzStack = &p->zStack[i];
@@ -1404,6 +1403,7 @@ int sqliteVdbeExec(
int returnDepth = 0; /* Next unused element in returnStack[] */
#ifdef VDBE_PROFILE
unsigned long long start;
int origPc;
#endif
@@ -1443,6 +1443,7 @@ int sqliteVdbeExec(
for(pc=0; !sqlite_malloc_failed && rc==SQLITE_OK && pc<p->nOp
VERIFY(&& pc>=0); pc++){
#ifdef VDBE_PROFILE
origPc = pc;
start = hwtime();
#endif
pOp = &p->aOp[pc];
@@ -5354,8 +5355,15 @@ default: {
}
#ifdef VDBE_PROFILE
pOp->cycles += hwtime() - start;
pOp->cnt++;
{
long long elapse = hwtime() - start;
pOp->cycles += elapse;
pOp->cnt++;
#if 0
fprintf(stdout, "%10lld ", elapse);
vdbePrintOp(stdout, origPc, &p->aOp[origPc]);
#endif
}
#endif
/* The following code adds nothing to the actual functionality