aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-04-28 14:15:12 +0000
committerdrh <drh@noemail.net>2016-04-28 14:15:12 +0000
commit75ab50ce8ff0821bae0989a86f037024fd6a8711 (patch)
treeb591d1993c92d1cd81d0e22b376e4f5eee2c61d0 /src
parent10c0a2a7c9e40ac583d5fb02701c19510110c78f (diff)
downloadsqlite-75ab50ce8ff0821bae0989a86f037024fd6a8711.tar.gz
sqlite-75ab50ce8ff0821bae0989a86f037024fd6a8711.zip
Use comments to mark several branches as optimizations. No changes to code.
FossilOrigin-Name: 33e627472780b872716c504f2d585cc057c390a5
Diffstat (limited to 'src')
-rw-r--r--src/hash.c4
-rw-r--r--src/util.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hash.c b/src/hash.c
index b5886e064..eea2dd1ac 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -55,7 +55,7 @@ void sqlite3HashClear(Hash *pH){
static unsigned int strHash(const char *z){
unsigned int h = 0;
unsigned char c;
- while( (c = (unsigned char)*z++)!=0 ){
+ while( (c = (unsigned char)*z++)!=0 ){ /*OPTIMIZATION-IF-TRUE*/
h = (h<<3) ^ h ^ sqlite3UpperToLower[c];
}
return h;
@@ -148,7 +148,7 @@ static HashElem *findElementWithHash(
int count; /* Number of elements left to test */
unsigned int h; /* The computed hash */
- if( pH->ht ){
+ if( pH->ht ){ /*OPTIMIZATION-IF-TRUE*/
struct _ht *pEntry;
h = strHash(pKey) % pH->htsize;
pEntry = &pH->ht[h];
diff --git a/src/util.c b/src/util.c
index 748f8e802..db6163c3c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1419,7 +1419,7 @@ LogEst sqlite3LogEst(u64 x){
if( x<2 ) return 0;
while( x<8 ){ y -= 10; x <<= 1; }
}else{
- while( x>255 ){ y += 40; x >>= 4; }
+ while( x>255 ){ y += 40; x >>= 4; } /*OPTIMIZATION-IF-TRUE*/
while( x>15 ){ y += 10; x >>= 1; }
}
return a[x&7] + y - 10;