mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Small performance gain by unwinding the string literal delimiter search
loop in the JSON parser by one more level. FossilOrigin-Name: 4c587feac153e8ebe526559ec3d254f545f81e8d1ed3126f91a5ff25ec4aa72e
This commit is contained in:
10
src/json.c
10
src/json.c
@@ -1412,11 +1412,13 @@ json_parse_restart:
|
||||
j = i+1;
|
||||
while( 1 /*exit-by-break*/ ){
|
||||
if( jsonIsOk[(u8)z[j]] ){
|
||||
if( jsonIsOk[(u8)z[j+1]] ){
|
||||
j += 2;
|
||||
continue;
|
||||
}else{
|
||||
if( !jsonIsOk[(u8)z[j+1]] ){
|
||||
j += 1;
|
||||
}else if( !jsonIsOk[(u8)z[j+2]] ){
|
||||
j += 2;
|
||||
}else{
|
||||
j += 3;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
c = z[j];
|
||||
|
||||
Reference in New Issue
Block a user