mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Performance improvement in sqlite3VarintLen().
FossilOrigin-Name: adf9fefb00ae1dbb07a921c6796cb0a9505c6d19
This commit is contained in:
@@ -1065,11 +1065,8 @@ u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
|
||||
** 64-bit integer.
|
||||
*/
|
||||
int sqlite3VarintLen(u64 v){
|
||||
int i = 0;
|
||||
do{
|
||||
i++;
|
||||
v >>= 7;
|
||||
}while( v!=0 && ALWAYS(i<9) );
|
||||
int i;
|
||||
for(i=1; (v >>= 7)!=0; i++){ assert( i<9 ); }
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user