From a93e366379eff56e886b0a7ee1f5db380a0db1b8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 28 Sep 2004 14:37:28 +0000 Subject: r2733: added a note on performance (This used to be commit 171fe8209794bb1e61283126ccc165b43fbcfa62) --- talloc_guide.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/talloc_guide.txt b/talloc_guide.txt index ae75f73d8e..24438ba722 100644 --- a/talloc_guide.txt +++ b/talloc_guide.txt @@ -39,6 +39,18 @@ source/torture/local/talloc.c to clarify how some particular situation 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 ---------- -- cgit