1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

doc: Update doc about talloc vs malloc speed

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat Sep 28 01:20:01 UTC 2024 on atb-devel-224
This commit is contained in:
Andreas Schneider 2023-03-29 11:04:38 +02:00 committed by Martin Schwenke
parent a66db6c16e
commit 03e880931d
3 changed files with 16 additions and 17 deletions

View File

@ -69,11 +69,11 @@
* @section talloc_performance 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 4% 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.
* have a performance test in Samba that measures talloc() versus malloc()
* performance, and it seems that talloc() is about 50% slower than malloc()
* (AMD Ryzen 9 3900X). 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.
*
* @section talloc_named Named blocks
*

View File

@ -767,12 +767,12 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</programlisting>
<refsect1><title>PERFORMANCE</title>
<para>
All the additional features of talloc(3) over malloc(3) 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.
price. We have a performance test in Samba that measures talloc() versus
malloc() performance, and it seems that talloc() is
about 50% slower than malloc() (AMD Ryzen 9 3900X). 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.
</para>
</refsect1>
<refsect1><title>SEE ALSO</title>

View File

@ -43,12 +43,11 @@ testsuite.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 4% 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
All the additional features of talloc() over malloc() do come at a price. We
have a performance test in Samba4 that measures talloc() versus malloc()
performance, and it seems that talloc() is about 50% slower than malloc() (AMD
Ryzen 9 3900X). 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.