r2733: added a note on performance
authorAndrew Tridgell <tridge@samba.org>
Tue, 28 Sep 2004 14:37:28 +0000 (14:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:27 +0000 (12:59 -0500)
(This used to be commit 171fe8209794bb1e61283126ccc165b43fbcfa62)

talloc_guide.txt

index ae75f73d8eccfebc50aeee0f8f312b63157529a6..24438ba722ce24cdecee3f1c6f88c214d5638c7f 100644 (file)
@@ -39,6 +39,18 @@ source/torture/local/talloc.c to clarify how some particular situation
 is handled.
 
 
 is handled.
 
 
+Performance
+-----------
+
+All the additional features of talloc() over malloc() do come at a
+price. We have a simple performance test in Samba4 that measures
+talloc() versus malloc() performance, and it seems that talloc() is
+about 10% slower than malloc() on my x86 Debian Linux box. For Samba,
+the great reduction in code complexity that we get by using talloc
+makes this worthwhile, especially as the total overhead of
+talloc/malloc in Samba is already quite small.
+
+
 talloc API
 ----------
 
 talloc API
 ----------