aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <>2023-04-08 13:01:34 +0000
committerdrh <>2023-04-08 13:01:34 +0000
commit2da07d9025f24ee10a6e2432394d36a291c96ea8 (patch)
tree536383e921068e744ab6433f3c712cf6008fb196 /src/sqliteInt.h
parent6d47af64e4d59951c8e8dd0d064fd6c2e4fe13d8 (diff)
parent65aae44b87551bac15ff2a58ca7d7d7f86ea1114 (diff)
downloadsqlite-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.h9
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
/*