diff options
author | drh <> | 2023-04-08 13:01:34 +0000 |
---|---|---|
committer | drh <> | 2023-04-08 13:01:34 +0000 |
commit | 2da07d9025f24ee10a6e2432394d36a291c96ea8 (patch) | |
tree | 536383e921068e744ab6433f3c712cf6008fb196 /src/sqliteInt.h | |
parent | 6d47af64e4d59951c8e8dd0d064fd6c2e4fe13d8 (diff) | |
parent | 65aae44b87551bac15ff2a58ca7d7d7f86ea1114 (diff) | |
download | sqlite-2da07d9025f24ee10a6e2432394d36a291c96ea8.tar.gz sqlite-2da07d9025f24ee10a6e2432394d36a291c96ea8.zip |
Optimizations to btree.c save about 4.5 million CPU cycles:
(1) Clone insertCell() into a separate insertCellFast() routine for
use by sqlite3BtreeInsert(). (2) Mark allocateSpace() as always-inline.
(3) Improved coalesence of adjacent free blocks in pageFreeArray().
FossilOrigin-Name: 5c12c400fe8eb4e86e14c69a6c34d0d78d9861e5d40a36c6a596a81c6dd65977
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 9b189124d..f33f6eb20 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -281,15 +281,22 @@ #endif /* -** A macro to hint to the compiler that a function should not be +** Macros to hint to the compiler that a function should or should not be ** inlined. */ #if defined(__GNUC__) # define SQLITE_NOINLINE __attribute__((noinline)) +# define SQLITE_INLINE __attribute__((always_inline)) inline #elif defined(_MSC_VER) && _MSC_VER>=1310 # define SQLITE_NOINLINE __declspec(noinline) +# define SQLITE_INLINE __forceinline #else # define SQLITE_NOINLINE +# define SQLITE_INLINE +#endif +#if defined(SQLITE_COVERAGE_TEST) +# undef SQLITE_INLINE +# define SQLITE_INLINE #endif /* |