mersenneforum.org A very fast Pari program (spin-off from 'New Mersenne software... Android')
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

2019-01-05, 02:52   #1
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

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

Quote:
 Originally Posted by axn 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

2019-01-05, 05:32   #2
paulunderwood

Sep 2002
Database er0rr

1101011011012 Posts

Quote:
 Originally Posted by science_man_88 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.

2019-01-05, 11:27   #3
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts

Quote:
 Originally Posted by paulunderwood 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.

2019-01-05, 20:11   #4
ewmayer
2ω=0

Sep 2002
República de California

9,791 Posts

Quote:
 Originally Posted by science_man_88 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?

2019-01-05, 20:18   #5
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

836910 Posts

Quote:
 Originally Posted by thorken 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 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...

2019-01-05, 21:32   #6
ewmayer
2ω=0

Sep 2002
República de California

9,791 Posts

Quote:
 Originally Posted by science_man_88 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?

2019-01-05, 21:39   #7
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts

Quote:
 Originally Posted by ewmayer 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.

2019-01-05, 22:44   #8
ewmayer
2ω=0

Sep 2002
República de California

100110001111112 Posts

Quote:
 Originally Posted by science_man_88 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?

2019-01-05, 23:01   #9
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

836910 Posts

Quote:
 Originally Posted by ewmayer 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.

2019-01-06, 22:39   #10
ewmayer
2ω=0

Sep 2002
República de California

9,791 Posts

Quote:
 Originally Posted by science_man_88 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?

2019-01-06, 22:41   #11
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts

Quote:
 Originally Posted by ewmayer 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.

 Thread Tools

 Similar Threads Thread Thread Starter Forum Replies Last Post thorken Software 53 2019-01-29 15:34 thorken Software 66 2019-01-13 21:08 Derived Number Theory Discussion Group 24 2016-09-08 11:45 Andrew Thall GPU Computing 109 2014-07-28 22:14 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.