1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Floating point and 64-bit integer constants store in the virtual

machine opcodes in binary, not as text.  Performance improvement.
Ticket #2733. (CVS 4507)

FossilOrigin-Name: 7e30fd6a09899842c922b044714dc66796e545d4
This commit is contained in:
drh
2007-10-23 15:39:45 +00:00
parent 55bfeb10cb
commit 598f134020
10 changed files with 96 additions and 59 deletions

View File

@@ -432,16 +432,15 @@ static void freeEphemeralFunction(FuncDef *pDef){
static void freeP3(int p3type, void *p3){
if( p3 ){
switch( p3type ){
case P3_REAL:
case P3_INT64:
case P3_MPRINTF:
case P3_DYNAMIC:
case P3_KEYINFO:
case P3_KEYINFO_HANDOFF: {
sqlite3_free(p3);
break;
}
case P3_MPRINTF: {
sqlite3_free(p3);
break;
}
case P3_VDBEFUNC: {
VdbeFunc *pVdbeFunc = (VdbeFunc *)p3;
freeEphemeralFunction(pVdbeFunc->pFunc);
@@ -631,6 +630,16 @@ static char *displayP3(Op *pOp, char *zTemp, int nTemp){
zP3 = zTemp;
break;
}
case P3_INT64: {
sqlite3_snprintf(nTemp, zTemp, "%lld", *(sqlite3_int64*)pOp->p3);
zP3 = zTemp;
break;
}
case P3_REAL: {
sqlite3_snprintf(nTemp, zTemp, "%.16g", *(double*)pOp->p3);
zP3 = zTemp;
break;
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
case P3_VTAB: {
sqlite3_vtab *pVtab = (sqlite3_vtab*)pOp->p3;