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

A simple change to the OP_Function opcode improves overall performance by

about 0.5%.

FossilOrigin-Name: b890eefd57fbd189f7df611e82eb1fb4b197e1c3
This commit is contained in:
drh
2013-11-21 03:43:12 +00:00
parent f93cd949a0
commit 76694c3ae5
3 changed files with 11 additions and 12 deletions

View File

@@ -1487,10 +1487,6 @@ case OP_Function: {
assert( pOp->p4type==P4_FUNCDEF );
ctx.pFunc = pOp->p4.pFunc;
ctx.s.flags = MEM_Null;
ctx.s.db = db;
ctx.s.xDel = 0;
ctx.s.zMalloc = 0;
ctx.iOp = pc;
ctx.pVdbe = p;
@@ -1498,7 +1494,10 @@ case OP_Function: {
** the pointer to ctx.s so in case the user-function can use
** the already allocated buffer instead of allocating a new one.
*/
sqlite3VdbeMemMove(&ctx.s, pOut);
memcpy(&ctx.s, pOut, sizeof(Mem));
pOut->flags = MEM_Null;
pOut->xDel = 0;
pOut->zMalloc = 0;
MemSetTypeFlag(&ctx.s, MEM_Null);
ctx.fErrorOrAux = 0;