Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Small performance improvement to OP_Column. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | experimental |
Files: | files | file ages | folders |
SHA1: |
b6b73a747ad8d0f026074e41c2a4adc5 |
User & Date: | drh 2011-08-29 02:16:18.855 |
Context
2011-08-29
| ||
02:49 | About a 1% overall performance improvement by using a macro to avoid no-op calls to sqlite3MemReleaseExternal(). (Closed-Leaf check-in: ff71d20a9e user: drh tags: experimental) | |
02:16 | Small performance improvement to OP_Column. (check-in: b6b73a747a user: drh tags: experimental) | |
2011-08-28
| ||
02:15 | About a 3% improvement in the performance of OP_Column. (check-in: edff9d4a99 user: drh tags: experimental) | |
Changes
Changes to src/vdbe.c.
︙ | ︙ | |||
2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 | Mem sMem; /* For storing the record being decoded */ u8 *zIdx; /* Index into header */ u8 *zEndHdr; /* Pointer to first byte after the header */ u32 offset; /* Offset into the data */ u32 szField; /* Number of bytes in the content of a field */ int szHdr; /* Size of the header size field at start of record */ int avail; /* Number of bytes of available data */ Mem *pReg; /* PseudoTable input register */ p1 = pOp->p1; p2 = pOp->p2; pC = 0; memset(&sMem, 0, sizeof(sMem)); | > | 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 | Mem sMem; /* For storing the record being decoded */ u8 *zIdx; /* Index into header */ u8 *zEndHdr; /* Pointer to first byte after the header */ u32 offset; /* Offset into the data */ u32 szField; /* Number of bytes in the content of a field */ int szHdr; /* Size of the header size field at start of record */ int avail; /* Number of bytes of available data */ u32 t; /* A type code from the record header */ Mem *pReg; /* PseudoTable input register */ p1 = pOp->p1; p2 = pOp->p2; pC = 0; memset(&sMem, 0, sizeof(sMem)); |
︙ | ︙ | |||
2291 2292 2293 2294 2295 2296 2297 | ** arrays. aType[i] will contain the type integer for the i-th ** column and aOffset[i] will contain the offset from the beginning ** of the record to the start of the data for the i-th column */ for(i=0; i<nField; i++){ if( zIdx<zEndHdr ){ aOffset[i] = offset; | > > > > | > > | | 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 | ** arrays. aType[i] will contain the type integer for the i-th ** column and aOffset[i] will contain the offset from the beginning ** of the record to the start of the data for the i-th column */ for(i=0; i<nField; i++){ if( zIdx<zEndHdr ){ aOffset[i] = offset; if( zIdx[0]<0x80 ){ t = zIdx[0]; zIdx++; }else{ zIdx += sqlite3GetVarint32(zIdx, &t); } aType[i] = t; szField = sqlite3VdbeSerialTypeLen(t); offset += szField; if( offset<szField ){ /* True if offset overflows */ zIdx = &zEndHdr[1]; /* Forces SQLITE_CORRUPT return below */ break; } }else{ /* If i is less that nField, then there are less fields in this |
︙ | ︙ |