[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12350: Composites identified as primes in factor.c (when HAVE_GMP)
From: |
Torbjorn Granlund |
Subject: |
bug#12350: Composites identified as primes in factor.c (when HAVE_GMP) |
Date: |
Mon, 08 Oct 2012 15:21:29 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) |
Jim Meyering <address@hidden> writes:
However, this little command does a lot of I/O, too:
191M input, 77M output.
Sure. I've never seen significant variance for such stuff, measurable
as CPU time.
I tested with a Sandybridge i3-2120T now. The range takes 32 s.
In both cases, the systems run GNU/Linux. The kernel version is 3.2.
The factoring speed varies very much with GCC version. I particular the
trial division code has a very tight loop, and such loops have more
compiler reliance. GCC 4.6 an later generate code that executes 4 insns
per (unsuccessful) division.
It is also important to use a 32bit binary. We should perhaps have
provided better 32-bit code paths to be used for numbers < 2^32 on
32-bit hardware. Now, Pádraig's example needs about 3x more time for a
32-bit binary on the same hardware.
--
Torbjörn
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), (continued)
bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Pádraig Brady, 2012/10/08
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Torbjorn Granlund, 2012/10/08
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Jim Meyering, 2012/10/08
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Pádraig Brady, 2012/10/08
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Torbjorn Granlund, 2012/10/08
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Jim Meyering, 2012/10/08
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP),
Torbjorn Granlund <=
- bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Pádraig Brady, 2012/10/08
bug#12350: Composites identified as primes in factor.c (when HAVE_GMP), Philipp Thomas, 2012/10/17