]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
doc: Update doc about talloc vs malloc speed
authorAndreas Schneider <asn@samba.org>
Wed, 29 Mar 2023 09:04:38 +0000 (11:04 +0200)
committerMartin Schwenke <martins@samba.org>
Sat, 28 Sep 2024 01:20:01 +0000 (01:20 +0000)
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

lib/talloc/doc/mainpage.dox
lib/talloc/man/talloc.3.xml
lib/talloc/talloc_guide.txt

index ece6ccb8f0c9a67d878b8c9f2ee24fd2d8f3b581..d881e503a43ce77af0a4e33c12619113a8f2cc40 100644 (file)
  * @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
  *
index c51061fce1feeb307ee8615f49929cb2d7715961..e26b16dbecff80de04a35dfe3dbd269c4dead258 100644 (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>
index dedda6c0678029a2570fc42aa371c0e5257992bb..d6e3646a1bda65de4339d1256c98ba1b3109fa0c 100644 (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.