mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2009-04-27, 15:54   #177
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

100100101012 Posts
Default

Quote:
Originally Posted by Andi47 View Post
Now THAT's a speedup!
That is a huge difference. My guess is your your GMP-ECM 6.2 with GMP 4.2.2 binary was probably *not* using the muldrec assembler code. That alone would make a huge difference.
Jeff Gilchrist is offline   Reply With Quote
Old 2009-04-27, 16:22   #178
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2×17×73 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
That is a huge difference. My guess is your your GMP-ECM 6.2 with GMP 4.2.2 binary was probably *not* using the muldrec assembler code. That alone would make a huge difference.
I had compiled my GMP-ECM 6.2 / GMP 4.2.2 binary with these command lines:

Code:
./configure --with-gmp=/usr/local --enable-asm-redc
make
make check
make ecm-params; make
make install
But GMP 4.2.2 had (mis-)detected my Core2Duo as Pentium 3, so that might be an additional reason for the huge difference.

Last fiddled with by Andi47 on 2009-04-27 at 16:25
Andi47 is offline   Reply With Quote
Old 2009-04-27, 17:58   #179
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3×17×23 Posts
Default

Quote:
Originally Posted by Andi47 View Post
But GMP 4.2.2 had (mis-)detected my Core2Duo as Pentium 3, so that might be an additional reason for the huge difference.
That and gmp-ecm probably picked pentium3 as well so didn't enable the sse2 code on your 6.2 binary as well.

Jeff.
Jeff Gilchrist is offline   Reply With Quote
Old 2009-04-27, 18:03   #180
Yamato
 
Yamato's Avatar
 
Sep 2005
Berlin

4216 Posts
Default

Quote:
Originally Posted by Jeff Gilchrist View Post
What command lines did you use for configure to compile gmp-ecm and gmp 4.3.0for Win32?

Thanks,
Jeff.
I used MinGW+msys under WinXP on Intel E8500 (Wolfdale).

./configure
(for gmp, without any options. sse2 was enabled automatically)

./configure --with-gmp=/local --enable-asm-redc --enable-sse2
(for ecm)

Interestingly, my older Notebook CPU (Intel T7300) wasn't recognized as Core2.
Yamato is offline   Reply With Quote
Old 2009-04-27, 18:52   #181
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3×17×23 Posts
Default

Quote:
Originally Posted by Yamato View Post
I used MinGW+msys under WinXP on Intel E8500 (Wolfdale).

./configure
(for gmp, without any options. sse2 was enabled automatically)

./configure --with-gmp=/local --enable-asm-redc --enable-sse2
(for ecm)
Thanks for the info. Since you didn't force it to use --build=pentium4 for ecm did you happen to notice what it detected it as (i686?). You might want to try using pentium4 as I saw a speedup from the default i686 selection:

./configure --with-gmp=/local --enable-asm-redc --enable-sse2 --build=pentium4

Jeff.
Jeff Gilchrist is offline   Reply With Quote
Old 2009-04-27, 19:04   #182
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

46438 Posts
Default

Without --build=pentium4 but with --enable-asm-redc, it'll use the asm mulredc code from athlon/ which is slower on Pentium 4. With --build=pentium4 and --enable-asm-redc, it'll use the asm mulredc code from pentium4/. Without --enable-asm-redc, it'll use only GMP functions, which seems to be faster than our own assembly code if GMP 4.3.0 is used. This is why --enable-asm-redc is enabled by default only on x86-64 now.

Alex
akruppa is offline   Reply With Quote
Old 2009-04-27, 21:18   #183
Andi_HB
 
Andi_HB's Avatar
 
Mar 2007
Germany

23×3×11 Posts
Default

Thx to all for the good work - and special thx to Yamato.
The binary from Yamato is the fastest till now for my Core 2 Duo T8100 on WinVista 32bit

Last fiddled with by Andi_HB on 2009-04-27 at 21:57
Andi_HB is offline   Reply With Quote
Old 2009-04-27, 23:54   #184
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

3·17·23 Posts
Default

Quote:
Originally Posted by akruppa View Post
Without --build=pentium4 but with --enable-asm-redc, it'll use the asm mulredc code from athlon/ which is slower on Pentium 4. With --build=pentium4 and --enable-asm-redc, it'll use the asm mulredc code from pentium4/. Without --enable-asm-redc, it'll use only GMP functions, which seems to be faster than our own assembly code if GMP 4.3.0 is used. This is why --enable-asm-redc is enabled by default only on x86-64 now.
Hmmm my testing seems to indicate otherwise.

*** Windows ECM BENCHMARK ***
Factoring: 1877138824359859508015524119652506869600959721781289179190693027302028679377371001561
Sigma: 980060817
Using B1=20000000, B2=2158570060, polynomial Dickson(6), sigma=980060817

===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-asm-redc --enable-sse2 --build=pentium4-pc-cygwin
===================================================
Step 1 took 80761ms
Step 2 took 2683ms
real 1m23.570s

===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-sse2 --build=pentium4-pc-cygwin
===================================================
Step 1 took 86674ms
Step 2 took 2698ms
real 1m29.607s

You can see that even with GMP 4.3.0 that using --enable-asm-redc is faster.

Jeff.
Jeff Gilchrist is offline   Reply With Quote
Old 2009-04-28, 08:15   #185
Yamato
 
Yamato's Avatar
 
Sep 2005
Berlin

2×3×11 Posts
Default

Another binary, built with

./configure --with-gmp=/local --enable-sse2 --build=pentium4
ecm623_win32_2.zip

This seems to be faster only for input numbers > 4.6*10^192.
Yamato is offline   Reply With Quote
Old 2009-04-28, 14:05   #186
Jeff Gilchrist
 
Jeff Gilchrist's Avatar
 
Jun 2003
Ottawa, Canada

49516 Posts
Default

Quote:
Originally Posted by Yamato View Post
This seems to be faster only for input numbers > 4.6*10^192.
Some more benchmarks using different size inputs from my binaries. In my case it seems that a C65, C85, and C130 are all faster using the muldrec code instead of leaving it up to GMP 4.3.0 alone:

Code:
*** Windows 32bit ECM BENCHMARK ***
Factoring: 34053408309992030649212497354061832056920539397279047809781589871
Sigma: 980060817
===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-asm-redc --enable-sse2 --build=pentium4-pc-cygwin
===================================================
GMP-ECM 6.2.3 [powered by GMP 4.3.0] [ECM]
Input number is 34053408309992030649212497354061832056920539397279047809781589871 (65 digits)
Using B1=20000000, B2=70272304840, polynomial Dickson(12), sigma=980060817
Step 1 took 58407ms
Step 2 took 19344ms

real    1m18.148s
user    1m17.766s
sys     0m0.109s

===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-sse2 --build=pentium4-pc-cygwin
===================================================
GMP-ECM 6.2.3 [powered by GMP 4.3.0] [ECM]
Input number is 34053408309992030649212497354061832056920539397279047809781589871 (65 digits)
Using B1=20000000, B2=70272304840, polynomial Dickson(12), sigma=980060817
Step 1 took 62821ms
Step 2 took 19921ms

real    1m23.117s
user    1m22.757s
sys     0m0.061s



Factoring: 1877138824359859508015524119652506869600959721781289179190693027302028679377371001561
Sigma: 980060817
===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-asm-redc --enable-sse2 --build=pentium4-pc-cygwin
===================================================
GMP-ECM 6.2.3 [powered by GMP 4.3.0] [ECM]
Input number is 1877138824359859508015524119652506869600959721781289179190693027302028679377371001561 (85 digits)
Using B1=20000000, B2=70272304840, polynomial Dickson(12), sigma=980060817
Step 1 took 79997ms
Step 2 took 23993ms

real    1m45.140s
user    1m44.021s
sys     0m0.108s

===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-sse2 --build=pentium4-pc-cygwin
===================================================
GMP-ECM 6.2.3 [powered by GMP 4.3.0] [ECM]
Input number is 1877138824359859508015524119652506869600959721781289179190693027302028679377371001561 (85 digits)
Using B1=20000000, B2=70272304840, polynomial Dickson(12), sigma=980060817
Step 1 took 87001ms
Step 2 took 23946ms

real    1m52.173s
user    1m50.947s
sys     0m0.108s



Factoring: 3561374769003472006611194942083317805928391841857811709042682130841367523415658737688338172847927090359833780290773316642214955689
Sigma: 980060817
===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-asm-redc --enable-sse2 --build=pentium4-pc-cygwin
===================================================
GMP-ECM 6.2.3 [powered by GMP 4.3.0] [ECM]
Input number is 3561374769003472006611194942083317805928391841857811709042682130841367523415658737688338172847927090359833780290773316642214955689 (130 digits)
Using B1=20000000, B2=70272304840, polynomial Dickson(12), sigma=980060817
Step 1 took 150479ms
Step 2 took 39250ms

real    3m11.015s
user    3m9.759s
sys     0m0.093s

===================================================
./configure --with-gmp=/home/Jeff/gmp-4.3.0/ --enable-sse2 --build=pentium4-pc-cygwin
===================================================
GMP-ECM 6.2.3 [powered by GMP 4.3.0] [ECM]
Input number is 3561374769003472006611194942083317805928391841857811709042682130841367523415658737688338172847927090359833780290773316642214955689 (130 digits)
Using B1=20000000, B2=70272304840, polynomial Dickson(12), sigma=980060817
Step 1 took 155174ms
Step 2 took 39515ms

real    3m15.745s
user    3m14.704s
sys     0m0.187s
Jeff Gilchrist is offline   Reply With Quote
Old 2009-04-28, 15:02   #187
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

31·101 Posts
Default

Back in version 6.1.1 when I tested it, --enable-asm-redc was faster up to around 190-200 digit numbers. Above that it was faster without the switch.

http://www.mersenneforum.org/showpos...1&postcount=28
ATH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Project Links masser Sierpinski/Riesel Base 5 25 2011-11-26 09:21
Links to Precompiled Msieve versions wblipp Msieve 0 2011-07-17 20:59
Links davieddy Information & Answers 9 2010-10-08 14:27
Links question ET_ PrimeNet 0 2008-01-26 09:35
Links. Xyzzy Forum Feedback 2 2007-03-18 02:17

All times are UTC. The time now is 17:34.

Tue May 11 17:34:21 UTC 2021 up 33 days, 12:15, 1 user, load averages: 2.57, 3.00, 3.43

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.