-C Automatically\scast\sBLOBs\sto\sstrings\sprior\sto\shanding\sthem\sover\sto\nfunctions\slike\sLIKE\sthat\swant\sstrings.\s\sTicket\s#1605.\s(CVS\s2928)
-D 2006-01-12T19:42:41
+C Performance\sboost\sin\ssqlite3VdbeRecordCompare.\s(CVS\s2929)
+D 2006-01-12T20:28:35
F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13
F src/vdbeInt.h 5451cf71f229e366ac543607c0a17f36e5737ea9
F src/vdbeapi.c afd3837cea0dec93dcb4724d073c84fa0da68e23
-F src/vdbeaux.c b3ac00584f18df9b4ca703ed30f3a378d7a975f7
+F src/vdbeaux.c 23ff126058826a41405f1cd4bff800476d6c633c
F src/vdbefifo.c 9efb94c8c3f4c979ebd0028219483f88e57584f5
F src/vdbemem.c dd08a0eea4868ac4a2d91fdec32424308b1db772
F src/where.c a8ba7f4aa2f38166e9f89ecc5dafbdbf41942031
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 6d2a816ede8d17b993a21e418cf25edd103334de
-R 971a03416cb2a532e33c04d063ff3d43
+P 730ddb0b74ed23c916dabd7ce893bd6bc55f3549
+R 36b85235284a365ef7c4f8a7c8bf02e6
U drh
-Z f5d21c5f0dab7a424c492c72d03de3db
+Z 308f9bd267f3ff57a7f1fa05f779432c
return 0;
}
+/*
+** The header of a record consists of a sequence variable-length integers.
+** These integers are almost always small and are encoded as a single byte.
+** The following macro takes advantage this fact to provide a fast decode
+** of the integers in a record header. It is faster for the common case
+** where the integer is a single byte. It is a little slower when the
+** integer is two or more bytes. But overall it is faster.
+**
+** The following expressions are equivalent:
+**
+** x = sqlite3GetVarint32( A, &B );
+**
+** x = GetVarint( A, B );
+**
+*/
+#define GetVarint(A,B) ((B = *(A))<=0x7f ? 1 : sqlite3GetVarint32(A, &B))
+
/*
** This function compares the two table rows or index records specified by
** {nKey1, pKey1} and {nKey2, pKey2}, returning a negative, zero
mem1.enc = pKeyInfo->enc;
mem2.enc = pKeyInfo->enc;
- idx1 = sqlite3GetVarint32(pKey1, &szHdr1);
+ idx1 = GetVarint(aKey1, szHdr1);
d1 = szHdr1;
- idx2 = sqlite3GetVarint32(pKey2, &szHdr2);
+ idx2 = GetVarint(aKey2, szHdr2);
d2 = szHdr2;
nField = pKeyInfo->nField;
while( idx1<szHdr1 && idx2<szHdr2 ){
u32 serial_type2;
/* Read the serial types for the next element in each key. */
- idx1 += sqlite3GetVarint32(&aKey1[idx1], &serial_type1);
+ idx1 += GetVarint( aKey1+idx1, serial_type1 );
if( d1>=nKey1 && sqlite3VdbeSerialTypeLen(serial_type1)>0 ) break;
- idx2 += sqlite3GetVarint32(&aKey2[idx2], &serial_type2);
+ idx2 += GetVarint( aKey2+idx2, serial_type2 );
if( d2>=nKey2 && sqlite3VdbeSerialTypeLen(serial_type2)>0 ) break;
/* Assert that there is enough space left in each key for the blob of