Re: Mersenne: Trial factoring time

2001-11-28 Thread Gareth Randall

Funny you should mention that...

I just switched from running mprime on my 400MHz K6-2, to running it on my 450MHz PII. 
I'd previously been running Tony Forbes' MFAC on the PII instead, but this fits mostly 
within level-1 cache and hence made no use of the larger PII cache or the better FPU. 
The result? Mprime cycle times down from 0.465 to 0.197sec, and I've been running this 
inefficient set-up for more than 8 months! Damn...

Of course, as you asked, Tony Forbes' MM61 mersenne project is at:
http://www.ltkz.demon.co.uk/ar2/mm61.htm

Yours,

Gareth Randall

George Woltman wrote:

> At 12:05 AM 11/28/2001 +0100, george de fockert wrote:
> 
>> My factoring machine speed is k6 400Mhz , and I know of the benchmark 
>> pages,
>> but there are no factoring benchmarks, only LL.
>> So, forget trial factoring for the next months, and do only LL ?
> 
> 
> The K6 (as well as Cyrix and Intel 486) chips have lousy floating point 
> units.
> So bad in fact that a 400 MHZ K6 is about 3 times slower than a 400 MHz
> PII when it comes to LL testing, ECM, and P-1 factoring.
> 
> What you need is a project that uses integer arithmetic - like 
> distributed.net.


-- 
=== Gareth Randall ===

_
Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Trial factoring time

2001-11-27 Thread bjb

On 26 Nov 2001, at 19:18, George Woltman wrote:

> Hi,
> 
> At 12:46 AM 11/27/2001 +0100, george de fockert wrote:
> >One of my machines does trial factoring.
> >Now in the M1790 range, factoring to 2^66.
> >This takes a very long time, is it better to let it double check ?
> 
> It is a matter of personal preference.  You can figure out how long a
> double-check would take at http://www.mersenne.org/bench.htm
> 
> Another option for slow machines is ECM factoring.  See
> http://www.mersenne.org/ecm.htm for details (this is not an
> automated project)

Or P-1 factoring. Again not automated.
> 
> >Or is it time for a more efficient trial factor implementation (if
> >possible ?).
> 
> If someone wants to volunteer to improve factoring performance that
> would be great.  The P4 could use an SSE2 implementation. 
> CPU-specific factoring code over 64 bits could be written.

I had a good look at this a couple of years ago. There are 
essentially two parts to the trial factoring "problem": one is 
generating candidate factors (or, rather, quickly avoiding those 
values which cannot for one reason or another possibly be factors), 
the other is actually trying the factor.

Whilst I was able to get reasonably close to the performance of 
George's code for trying the factor - possibly even a tiny bit better 
for factors with only just over 2^64 - I got nowhere near the 
performance of his candidate elimination code.

One of the lessons I learned from the effort is that multiple 
precision arithmetic is _hard work_ on systems which have only 
one carry flag. If SSE/SSE2 enables you to have multiple carry 
flags then you could effectively try two or more factors in parallel, 
this would yield a considerable performance increase. But I'm not 
sure offhand whether the instruction set supports this. In any case, 
slower systems (the ones that _should_ be running factoring?) 
don't in any case support SSE or SSE2.
> 
> While factoring could probably be improved tens of percent, it has not
> been a high priority item for me.  A 10% boost in factoring speed lets
> you factor (on average) 10% deeper, which finds about 1 more factor in
> every 650 exponents.  That isn't a great throughput improvement for
> the GIMPS project.

Indeed.

The other way to look at this (same conclusion) is that factoring is 
way, way ahead of LL testing, so any perceived inefficiency is not 
critical.

Regards
Brian Beesley
_
Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Trial factoring time

2001-11-26 Thread George Woltman

Hi,

At 12:46 AM 11/27/2001 +0100, george de fockert wrote:
>One of my machines does trial factoring.
>Now in the M1790 range, factoring to 2^66.
>This takes a very long time, is it better to let it double check ?

It is a matter of personal preference.  You can figure out how long
a double-check would take at http://www.mersenne.org/bench.htm

Another option for slow machines is ECM factoring.  See
http://www.mersenne.org/ecm.htm for details (this is not an
automated project)

>Or is it time for a more efficient trial factor implementation (if possible
>?).

If someone wants to volunteer to improve factoring performance that
would be great.  The P4 could use an SSE2 implementation.  CPU-specific
factoring code over 64 bits could be written.

While factoring could probably be improved tens of percent, it has not
been a high priority item for me.  A 10% boost in factoring speed lets
you factor (on average) 10% deeper, which finds about 1 more factor in
every 650 exponents.  That isn't a great throughput improvement for
the GIMPS project.

-- George

_
Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Mersenne: Trial factoring time

2001-11-26 Thread george de fockert


Hi all,
One of my machines does trial factoring.
Now in the M1790 range, factoring to 2^66.
This takes a very long time, is it better to let it double check ?
Or is it time for a more efficient trial factor implementation (if possible
?).

George de Fockert





_
Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers