Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Wed Mar 16 14:47:49 2016 +0100
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Wed Mar 16 14:47:49 2016 +0100
Add note on performance of commutative functions with assignment to operand
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/man/libzahl.7 b/man/libzahl.7
index 6f7aa59..f6dc99e 100644
_AT_@ -25,6 +25,21 @@ them for reuse.
With the exception of functions working with strings,
all output parameters are before the input parameters.
+Like any self-respecting big number library, libzahl
+supports assign values to variables that are also
+input variables. However, keep in mind that commutative
+functions are optimised for the first operand to also
+be the output over the second operand to also be the
+input. For example, \fIzadd(a,a,b)\fP should be faster
+than \fIzadd(a,b,a)\fP, although both are supported.
+Whether or not the function believe that it is more
+likely to occur that the input variables are different
+that the output variable than the output variable
+being the first input variable depends on the function.
+Some functions are implemented to believe that the
+first is more likely, other fucntions are implemented
+to believe that the latter is more likely.
GMP MP cannot be used for rubust programs. LibTomMath
is too slow, probably because of all memory allocations,
Received on Wed Mar 16 2016 - 14:47:53 CET
This archive was generated by hypermail 2.3.0
: Wed Mar 16 2016 - 14:48:12 CET