1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Save a 78 bytes of code space and a million CPU cycles in speedtest1 by

storing the cell index for the leaf page in the BtCursor object in its own
field (BtCursor.ix), rather than as an entry in the BtCursor.aiIdx array.

FossilOrigin-Name: 2452f0617d1085689264b5f66681788cfe9e3b1a7b318307c93942b702a443df
This commit is contained in:
drh
2017-04-01 00:20:06 +00:00
parent 53b2459a36
commit 75e96b3100
4 changed files with 48 additions and 46 deletions

View File

@@ -517,6 +517,7 @@ struct BtCursor {
** initialized. */
i8 iPage; /* Index of current page in apPage */
u8 curIntKey; /* Value of apPage[0]->intKey */
u16 ix; /* Current index for apPage[iPage] */
struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
void *padding1; /* Make object size a multiple of 16 */
u16 aiIdx[BTCURSOR_MAX_DEPTH]; /* Current index in apPage[i] */