1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Performance optimization for the sqlite3ExprListDelete() routine.

FossilOrigin-Name: 2764aeaa11f38cf2ff4d6191e6d5466ddb203022
This commit is contained in:
drh
2016-04-11 18:25:05 +00:00
parent bea119cdeb
commit affa855c94
3 changed files with 11 additions and 9 deletions

View File

@@ -1278,10 +1278,9 @@ void sqlite3ExprListCheckLength(
/*
** Delete an entire expression list.
*/
void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
static SQLITE_NOINLINE void exprListDeleteNN(sqlite3 *db, ExprList *pList){
int i;
struct ExprList_item *pItem;
if( pList==0 ) return;
assert( pList->a!=0 || pList->nExpr==0 );
for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
sqlite3ExprDelete(db, pItem->pExpr);
@@ -1291,6 +1290,9 @@ void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
sqlite3DbFree(db, pList->a);
sqlite3DbFree(db, pList);
}
void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
if( pList ) exprListDeleteNN(db, pList);
}
/*
** Return the bitwise-OR of all Expr.flags fields in the given