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

The putVarint32() macro does not optimize well. So expand it into in-line

code in places were performance is an issue.

FossilOrigin-Name: 390c239e53cf936a97b268dce8171f0b17050542ae64735ca8ef375fec2c9544
This commit is contained in:
drh
2022-04-01 21:01:37 +00:00
parent 759e507ce5
commit b47b1f67dc
4 changed files with 23 additions and 11 deletions

View File

@@ -9314,7 +9314,11 @@ int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){
u32 nRem; /* Bytes of data still to copy */
getCellInfo(pSrc);
aOut += putVarint32(aOut, pSrc->info.nPayload);
if( pSrc->info.nPayload<0x80 ){
*(aOut++) = pSrc->info.nPayload;
}else{
aOut += sqlite3PutVarint(aOut, pSrc->info.nPayload);
}
if( pDest->pKeyInfo==0 ) aOut += putVarint(aOut, iKey);
nIn = pSrc->info.nLocal;
aIn = pSrc->info.pPayload;