aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/common.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-03 23:53:32 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-03 23:54:54 +0200
commit52da5b8724df577daacde7d705257c722422cd19 (patch)
tree6e118fe3570a98cf0263128663814a3d1e1813a9 /core/math/big/common.odin
parentb1ed7fc6b9bb16540a76d8edf286415f641ae120 (diff)
big: Default to Frobenius-Underwood. It's 10% faster than Lucas-Selfridge.
Diffstat (limited to 'core/math/big/common.odin')
-rw-r--r--core/math/big/common.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/math/big/common.odin b/core/math/big/common.odin
index 4d8224cd6..243e74d0c 100644
--- a/core/math/big/common.odin
+++ b/core/math/big/common.odin
@@ -80,7 +80,8 @@ FACTORIAL_BINARY_SPLIT_MAX_RECURSIONS := 100;
Use Frobenius-Underwood for primality testing, or use Lucas-Selfridge (default).
*/
-MATH_BIG_USE_FROBENIUS_TEST :: #config(MATH_BIG_USE_FROBENIUS_TEST, false);
+MATH_BIG_USE_LUCAS_SELFRIDGE_TEST :: #config(MATH_BIG_USE_LUCAS_SELFRIDGE_TEST, false);
+MATH_BIG_USE_FROBENIUS_TEST :: !MATH_BIG_USE_LUCAS_SELFRIDGE_TEST;
/*
Runtime tunable to use Miller-Rabin primality testing only and skip the above.