add overridable macros to the install docs

Fri, 07 Jul 2023 17:59:52 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 07 Jul 2023 17:59:52 +0200
changeset 737
b3b113eac3b8
parent 736
70885c3d15b0
child 738
54b1d577551b
child 739
529c35a768f3

add overridable macros to the install docs

docs/src/install.md file | annotate | diff | comparison | revisions
--- a/docs/src/install.md	Fri Jul 07 17:51:54 2023 +0200
+++ b/docs/src/install.md	Fri Jul 07 17:59:52 2023 +0200
@@ -18,6 +18,35 @@
     cmake --build .
     sudo cmake --install .
 
+When compiling UCX 3, you can tweak the buffer sizes for small-buffer-optimization.
+You can do this, be pre-defining one or more of the following macros:
+
+--------------------------------- --------------------------------------------------------------------- ----------
+Macro                             Description                                                           Default
+--------------------------------- --------------------------------------------------------------------- ----------
+CX_ARRAY_SWAP_SBO_SIZE            The maximum item size in an array list that uses SBO.                 128
+
+CX_LINKED_LIST_SORT_SBO_SIZE      The maximum list size that uses SBO during sort.                      1024
+
+CX_LINKED_LIST_SWAP_SBO_SIZE      The maximum item size that uses SBO swap instead of relinking.        128
+
+CX_PRINTF_SBO_SIZE                The maximum string length printf.h uses stack memory for.             512
+
+CX_STRSTR_SBO_SIZE                The maximum length of the "needle" in strstr that can use SBO.        512
+--------------------------------- --------------------------------------------------------------------- ----------
+
+You can also tweak some other buffer sizes with the same technique:
+
+--------------------------------- --------------------------------------------------- ----------
+Macro                             Description                                         Default
+--------------------------------- --------------------------------------------------- ----------
+CX_STRREPLACE_INDEX_BUFFER_SIZE   The number of matches one index buffer can store.   64
+
+CX_STREAM_COPY_BUF_SIZE           The buffer size on the stack for a stream copy.     1024
+
+CX_STREAM_BCOPY_BUF_SIZE          The buffer size on the heap for a stream copy.      8192
+--------------------------------- --------------------------------------------------- ----------
+
 ---
 
 ### UCX 2.1

mercurial