aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
authordrh <>2022-04-02 22:47:47 +0000
committerdrh <>2022-04-02 22:47:47 +0000
commitc2808f39d1b9f13d362a465ee3687022b51f6b40 (patch)
tree173fe5b4d2f21f1cc04d1a129f47fa2f926c0339 /src/vdbeaux.c
parent1f416db2926d5c41e04db2537f6343959b7bb09e (diff)
downloadsqlite-c2808f39d1b9f13d362a465ee3687022b51f6b40.tar.gz
sqlite-c2808f39d1b9f13d362a465ee3687022b51f6b40.zip
Expand the getVarint32() macro in a few places, as the C-compiler seems to
be able to optimize better when that macro is expanded manually. FossilOrigin-Name: cd4fe34b98bf5ce26f3596c717edb73932f3b46ad6e9b4934d06b7b3c176a0d6
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index aa45cae54..8fdd85abb 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -4419,14 +4419,22 @@ int sqlite3VdbeRecordCompareWithSkip(
** two elements in the keys are equal. Fix the various stack variables so
** that this routine begins comparing at the second field. */
if( bSkip ){
- u32 s1;
- idx1 = 1 + getVarint32(&aKey1[1], s1);
+ u32 s1 = aKey1[1];
+ if( s1<0x80 ){
+ idx1 = 2;
+ }else{
+ idx1 = 1 + sqlite3GetVarint32(&aKey1[1], &s1);
+ }
szHdr1 = aKey1[0];
d1 = szHdr1 + sqlite3VdbeSerialTypeLen(s1);
i = 1;
pRhs++;
}else{
- idx1 = getVarint32(aKey1, szHdr1);
+ if( (szHdr1 = aKey1[0])<0x80 ){
+ idx1 = 1;
+ }else{
+ idx1 = sqlite3GetVarint32(aKey1, &szHdr1);
+ }
d1 = szHdr1;
i = 0;
}