Introduction
Introduction Statistics Contact Development Disclaimer Help
Manual: use inplace addition whenever possible - libzahl - big integer library
git clone git://git.suckless.org/libzahl
Log
Files
Refs
README
LICENSE
---
commit 626dc2a770207bc1398214e040166f58ec9b8df4
parent 696d91144f19e4bac1265ae7665a3db72b845722
Author: Mattias Andrée <[email protected]>
Date: Wed, 11 May 2016 20:50:06 +0200
Manual: use inplace addition whenever possible
Signed-off-by: Mattias Andrée <[email protected]>
Diffstat:
M doc/arithmetic.tex | 17 +++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/doc/arithmetic.tex b/doc/arithmetic.tex
@@ -87,6 +87,23 @@ is however not implemented because it is
not deemed important enough and would
be detrimental to libzahl's simplicity.
+{\tt zadd} and {\tt zadd\_unsigned} support
+in-place operation:
+
+\begin{alltt}
+ zadd(a, a, b);
+ zadd(b, a, b); \textcolor{c}{/* \textrm{should be avoided} */}
+ zadd_unsigned(a, a, b);
+ zadd_unsigned(b, a, b); \textcolor{c}{/* \textrm{should be avoided} */}
+\end{alltt}
+
+\noindent
+Use this whenever possible, it will improve
+your performance, as it will involve less
+CPU instructions for each character-addition
+and it may be possible to elementation some
+character-additions.
+
\newpage
\section{Subtraction}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.