[libmath-prime-util-perl] 12/25: Adjust M factor: save a little memory, gain a bit of performance
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:50:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.35
in repository libmath-prime-util-perl.
commit 200a6d571aa6825de3009e64bf69e0ff92be6e3a
Author: Dana Jacobsen <dana at acm.org>
Date: Thu Dec 5 12:46:29 2013 -0800
Adjust M factor: save a little memory, gain a bit of performance
---
lmo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lmo.c b/lmo.c
index 30c5924..0a9707e 100644
--- a/lmo.c
+++ b/lmo.c
@@ -50,10 +50,10 @@
/* Below this size, just sieve (with table speedup). */
#define SIEVE_LIMIT 60000000
/* Adjust to get best performance */
-#define M_FACTOR(n) (UV) ((double)n * (log(n)/log(3)))
+#define M_FACTOR(n) (UV) ((double)n * (log(n)/log(6)))
/* Size of segment used for previous primes, must be >= 21 */
#define PREV_SIEVE_SIZE 512
-/* Phi sieve multiplier, adjust for best performance */
+/* Phi sieve multiplier, adjust for best performance and memory use. */
#define PHI_SIEVE_MULT 13
#define FUNC_icbrt 1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git
More information about the Pkg-perl-cvs-commits
mailing list