"Shawn Wilsher" <[EMAIL PROTECTED]> wrote:
> Hmm, the documentation (http://sqlite.org/compile.html) doesn't seem
> to say anything about [sqlite3_release_memory() only working if
> SQLITE_ENABLE_MEMORY_MANAGEMENT=1 is used]. Is there a cost to
> pay by enabling those functions, or no?
>
There is extra overhead associated with SQLITE_ENABLE_MEMORY_MANAGEMENT.
I just ran some tests using the latest code in CVS on SuSE 10.1
and gcc 4.1.0 with -O6 (non-amalgamation). For the workload
I used the mix of operations found in the speed2.test test file
in the source tree.
+TS means SQLITE_THREADSAFE=1. -TS means SQLITE_THREADSAFE=0.
+MM means SQLITE_ENABLE_MEMORY_MANAGEMENT=1 is defined. -MM
means it is not.
Configuration Raw-Time Normalized
-TS -MM 34427759 100
-TS +MM 35589951 103
+TS -MM 38751594 113
+TS +MM 41907742 122
So it appears that with threadsafe disabled, the performance
hit for memory management is only about 3%. With threading
enabled, the hit is more like 9%. This makes sense because
there is additional mutexing that has to occur when managing
the memory pool across multiple threads.
--
D. Richard Hipp <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------