/ Check-in [730d7efb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove an unnecessary memset() for a small size reduction and speed improvement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:730d7efb6fef54ed7c1f4ae27e3b55778ea6ff01
User & Date: drh 2016-01-20 02:01:02
Context
2016-01-20
02:21
Remove an unnecessary memset() from the symbol name resolver. check-in: da527dda user: drh tags: trunk
02:01
Remove an unnecessary memset() for a small size reduction and speed improvement. check-in: 730d7efb user: drh tags: trunk
01:48
During compilation, transfer the azVar[0..nzVar-1] array from Parse to Vdbe rather than copying it. Smaller and faster code. check-in: 80dd495f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

   845    845   */
   846    846   int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
   847    847     VdbeOp *pOp;
   848    848     if( p->db->mallocFailed ) return 0;
   849    849     assert( addr>=0 && addr<p->nOp );
   850    850     pOp = &p->aOp[addr];
   851    851     freeP4(p->db, pOp->p4type, pOp->p4.p);
   852         -  memset(pOp, 0, sizeof(pOp[0]));
          852  +  pOp->p4type = P4_NOTUSED;
   853    853     pOp->opcode = OP_Noop;
   854    854     return 1;
   855    855   }
   856    856   
   857    857   /*
   858    858   ** If the last opcode is "op" and it is not a jump destination,
   859    859   ** then remove it.  Return true if and only if an opcode was removed.