1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

An optimization to initMemArray() saves almost 500K cycles. But it seems a

little dodgy.  I want to think about this more before merging to trunk.
Perhaps there is a cleaner way to accomplish the same.

FossilOrigin-Name: 7fefd8676110a53e6c98a697e2dbf820740fe602a1e83b6caa8d099c41a15d80
This commit is contained in:
drh
2022-02-28 03:25:13 +00:00
parent b3d981c3b7
commit c9373e86e8
5 changed files with 51 additions and 24 deletions

View File

@@ -1087,6 +1087,8 @@ int sqlite3_data_count(sqlite3_stmt *pStmt){
/*
** Return a pointer to static memory containing an SQL NULL value.
**
** Must be revised if column order for Mem changes. tag-20220228a.
*/
static const Mem *columnNullValue(void){
/* Even though the Mem structure contains an element
@@ -1104,15 +1106,15 @@ static const Mem *columnNullValue(void){
#endif
= {
/* .u = */ {0},
/* .z = */ (char*)0,
/* .n = */ (int)0,
/* .flags = */ (u16)MEM_Null,
/* .enc = */ (u8)0,
/* .eSubtype = */ (u8)0,
/* .n = */ (int)0,
/* .z = */ (char*)0,
/* .zMalloc = */ (char*)0,
/* .db = */ (sqlite3*)0,
/* .szMalloc = */ (int)0,
/* .uTemp = */ (u32)0,
/* .db = */ (sqlite3*)0,
/* .zMalloc = */ (char*)0,
/* .xDel = */ (void(*)(void*))0,
#ifdef SQLITE_DEBUG
/* .pScopyFrom = */ (Mem*)0,