mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Avoid initializing the column-cache section of the Parse object, since entries
in the cache will be initialized as they are used, and avoiding the initial memset() saves many CPU cycles. FossilOrigin-Name: 63cf7eafae5c3c1379edf416c5157010c7c120b5
This commit is contained in:
@@ -524,11 +524,13 @@ static int sqlite3Prepare(
|
||||
int i; /* Loop counter */
|
||||
|
||||
/* Allocate the parsing context */
|
||||
pParse = sqlite3StackAllocZero(db, sizeof(*pParse));
|
||||
pParse = sqlite3StackAllocRaw(db, sizeof(*pParse));
|
||||
if( pParse==0 ){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
goto end_prepare;
|
||||
}
|
||||
memset(pParse, 0, PARSE_HDR_SZ);
|
||||
memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);
|
||||
pParse->pReprepare = pReprepare;
|
||||
assert( ppStmt && *ppStmt==0 );
|
||||
/* assert( !db->mallocFailed ); // not true with SQLITE_USE_ALLOCA */
|
||||
|
||||
Reference in New Issue
Block a user