[Gmp-commit] /var/hg/gmp: tune/tune-gcd-p.c (main): Fixed broken loop conditi...
mercurial at gmplib.org
mercurial at gmplib.org
Mon Oct 3 10:10:41 CEST 2011
details: /var/hg/gmp/rev/ecd1229d18ed
changeset: 14248:ecd1229d18ed
user: Niels Möller <nisse at lysator.liu.se>
date: Mon Oct 03 10:10:19 2011 +0200
description:
tune/tune-gcd-p.c (main): Fixed broken loop conditions.
diffstat:
ChangeLog | 4 ++++
tune/tune-gcd-p.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r e4ad46a37647 -r ecd1229d18ed ChangeLog
--- a/ChangeLog Mon Oct 03 09:58:32 2011 +0200
+++ b/ChangeLog Mon Oct 03 10:10:19 2011 +0200
@@ -1,3 +1,7 @@
+2011-10-03 Niels Möller <nisse at lysator.liu.se>
+
+ * tune/tune-gcd-p.c (main): Fixed broken loop conditions.
+
2011-09-26 Torbjorn Granlund <tege at gmplib.org>
* mpn/sh/sh2/submul_1.asm: Make this old submul_1 implementation
diff -r e4ad46a37647 -r ecd1229d18ed tune/tune-gcd-p.c
--- a/tune/tune-gcd-p.c Mon Oct 03 09:58:32 2011 +0200
+++ b/tune/tune-gcd-p.c Mon Oct 03 10:10:19 2011 +0200
@@ -172,7 +172,7 @@
memset (p_table, 0, sizeof(p_table));
- for (n = 100; n++; n < P_TABLE_SIZE)
+ for (n = 100; n < P_TABLE_SIZE; n++)
{
mp_size_t p;
mp_size_t best_p;
@@ -189,7 +189,7 @@
lehmer_time = bench_gcd (&data, 0);
- best_p = search (&best_time, bench_gcd, &data, 10, n-10);
+ best_p = search (&best_time, bench_gcd, &data, n/5, 4*n/5);
if (best_time > lehmer_time)
best_p = 0;
More information about the gmp-commit
mailing list