/ Check-in [3c93c8f5]
Login

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

Overview
Comment:Small size and performance optimization to sqlite3VdbeChangeP5().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3c93c8f5bbf54ed2a331079b28fdd94eb0e59e69
User & Date: drh 2016-09-29 20:28:34
Context
2016-09-30
17:46
Avoid unnecessary Mem initializations when generating a new sqlite3_stmt object. check-in: 47ae1cda user: drh tags: trunk
2016-09-29
20:28
Small size and performance optimization to sqlite3VdbeChangeP5(). check-in: 3c93c8f5 user: drh tags: trunk
19:50
Remove the peep-hole optimization of removing OP_Close opcodes that come before OP_Halt, as the extra work of removing those opcodes uses more cycles than just running them. check-in: 984a96d7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

   760    760   void sqlite3VdbeChangeP2(Vdbe *p, u32 addr, int val){
   761    761     sqlite3VdbeGetOp(p,addr)->p2 = val;
   762    762   }
   763    763   void sqlite3VdbeChangeP3(Vdbe *p, u32 addr, int val){
   764    764     sqlite3VdbeGetOp(p,addr)->p3 = val;
   765    765   }
   766    766   void sqlite3VdbeChangeP5(Vdbe *p, u8 p5){
   767         -  if( !p->db->mallocFailed ) p->aOp[p->nOp-1].p5 = p5;
          767  +  assert( p->nOp>0 || p->db->mallocFailed );
          768  +  if( p->nOp>0 ) p->aOp[p->nOp-1].p5 = p5;
   768    769   }
   769    770   
   770    771   /*
   771    772   ** Change the P2 operand of instruction addr so that it points to
   772    773   ** the address of the next instruction to be coded.
   773    774   */
   774    775   void sqlite3VdbeJumpHere(Vdbe *p, int addr){