mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2019-01-05, 02:52   #1
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000101100012 Posts
Post A very fast Pari program (spin-off from 'New Mersenne software... Android')

Quote:
Originally Posted by axn View Post
3 min 7 sec / 11 sec = 17x
23min 7 sec / 1 min 38.5 sec = 14x

OP's code has better scaling than GMP-based one !
Paridroid gave 4.66 and 28.66 seconds with a halfass script:

Code:
try(p)=my(x=Mod(4,2^p-1));for(y=3,p,sqr(x)-2);x==0
science_man_88 is offline   Reply With Quote
Old 2019-01-05, 05:32   #2
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

1101011011012 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
Paridroid gave 4.66 and 28.66 seconds with a halfass script:

Code:
try(p)=my(x=Mod(4,2^p-1));for(y=3,p,sqr(x)-2);x==0
We can easily make SM's code quicker with RG's code posted elsewhere which does the mod reduction efficiently.
paulunderwood is offline   Reply With Quote
Old 2019-01-05, 11:27   #3
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
We can easily make SM's code quicker with RG's code posted elsewhere which does the mod reduction efficiently.
my paridroid stops working if I allocate more memory, so it'll depend on it not crashing with that, and such.
science_man_88 is offline   Reply With Quote
Old 2019-01-05, 20:11   #4
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

9,791 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
Paridroid gave 4.66 and 28.66 seconds with a halfass script:

Code:
try(p)=my(x=Mod(4,2^p-1));for(y=3,p,sqr(x)-2);x==0
What exponents are those timings for, and on what compute hardware?
ewmayer is offline   Reply With Quote
Old 2019-01-05, 20:18   #5
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

836910 Posts
Default

Quote:
Originally Posted by thorken View Post
Let's see colleague who is very good at insulting you without even being able to execute the application given your extensive experience. You say my program reads numbers from somewhere? Finally apprentice magician is very good insult without having much idea of ​​programming so it seems, make your an app for Movil that calculates numbers of Mersenne, here you are making comparisons with i7 and the cpu of a mobile. This program is for mobile and is the fastest on Android, the only one I've seen is a Google Play apk and it's very slow, this one is much faster and I'm talking about Android and mobile cpus, prime95 in AtoM n270 It is slower than this app in a GT-I9195. Greetings.
They were just saying that's one possible way some program without source given could be both fast and accurate to what's already known. As shown a interpretted script can run faster. Also I got that lucas Lehmer app you talked about, when it takes 27-28 seconds for 12711 then yes many programs could run faster. that's why coders use asymptotics.

Quote:
Originally Posted by ewmayer View Post
What exponents are those timings for, and on what compute hardware?
same exponents as OP, on the only working hardware I have at last check an android phone. I think it has a snapdragon processor, and PARIdroid was 2.11.0.1.5 edit2: seems my PARIdroid thinks they aren't prime though...
science_man_88 is offline   Reply With Quote
Old 2019-01-05, 21:32   #6
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

9,791 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
same exponents as OP, on the only working hardware I have at last check an android phone. I think it has a snapdragon processor, and PARIdroid was 2.11.0.1.5 edit2: seems my PARIdroid thinks they aren't prime though...
OP listed timings for 3 exponents in 2 separate posts: 23209,86243 and 216091. Which 2 of these are you talking about?
ewmayer is offline   Reply With Quote
Old 2019-01-05, 21:39   #7
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by ewmayer View Post
OP listed timings for 3 exponents in 2 separate posts: 23209,86243 and 216091. Which 2 of these are you talking about?
the latter 2 , but I realize why it was so quick forgot an x= part.
science_man_88 is offline   Reply With Quote
Old 2019-01-05, 22:44   #8
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

100110001111112 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
the latter 2 , but I realize why it was so quick forgot an x= part.
So your simple Pari script running on Android is nearly 4x faster than GP2's GMP-based LL tester running on an AWS Skylake core?
ewmayer is offline   Reply With Quote
Old 2019-01-05, 23:01   #9
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

836910 Posts
Default

Quote:
Originally Posted by ewmayer View Post
So your simple Pari script running on Android is nearly 4x faster than GP2's GMP-based LL tester running on an AWS Skylake core?
I typoed, so no. in fact without being able to not crash Paridroid with more memory allocated or just stalling I may not even be to even properly run the test.
science_man_88 is offline   Reply With Quote
Old 2019-01-06, 22:39   #10
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

9,791 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I typoed, so no. in fact without being able to not crash Paridroid with more memory allocated or just stalling I may not even be to even properly run the test.
So instead of repeatedly computing x = x^2-2 (mod 2^p-1), you set x = 4 and repeatedly computed x^2-2 without updating x ... so your final result should be x = 4, which means your x==0 of the final result should have come up 'false'. You didn't notice that?
ewmayer is offline   Reply With Quote
Old 2019-01-06, 22:41   #11
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by ewmayer View Post
So instead of repeatedly computing x = x^2-2 (mod 2^p-1), you set x = 4 and repeatedly computed x^2-2 without updating x ... so your final result should be x = 4, which means your x==0 of the final result should have come up 'false'. You didn't notice that?
I didn't know the exponents created primes. I haven't put CRG's MeVec script back on my device.
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEGAPOST apps to compute mersenne primes, factorization and computing decimals of pi on android thorken Software 53 2019-01-29 15:34
New Mersenne Software For Test Mersenne Prime Numbers On Android thorken Software 66 2019-01-13 21:08
Find Mersenne Primes twice as fast? Derived Number Theory Discussion Group 24 2016-09-08 11:45
Fast Mersenne Testing on the GPU using CUDA Andrew Thall GPU Computing 109 2014-07-28 22:14
Porting pari/gp routines into a C program?? EdH Programming 17 2012-10-30 03:41

All times are UTC. The time now is 00:13.

Wed Oct 21 00:13:26 UTC 2020 up 40 days, 21:24, 0 users, load averages: 1.49, 1.88, 1.93

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.