aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-09 19:08:55 +0000
committerlloyd <[email protected]>2008-09-09 19:08:55 +0000
commita2205abbe89f4f2a4e36f7d8f27fcd33742fe762 (patch)
treeade45a760b827d34bb8d2ecbfaf31588e097d185
parent3983d92b673f6eeb5c4d27fbe8aa8aa8fbb62c91 (diff)
Add comment about bigint_simple_sqr just being an optimization to work around lack of restricted pointers
-rw-r--r--src/mp_mulop.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mp_mulop.cpp b/src/mp_mulop.cpp
index 65a87610b..44c8757e7 100644
--- a/src/mp_mulop.cpp
+++ b/src/mp_mulop.cpp
@@ -37,7 +37,12 @@ void bigint_simple_mul(word z[], const word x[], u32bit x_size,
}
/*************************************************
-* Simple O(N^2) Squaring *
+* Simple O(N^2) Squaring
+
+This is exactly the same algorithm as bigint_simple_mul,
+however because C/C++ compilers suck at alias analysis it
+is good to have the version where the compiler knows
+that x == y
*************************************************/
void bigint_simple_sqr(word z[], const word x[], u32bit x_size)
{