mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Lounge (https://www.mersenneforum.org/forumdisplay.php?f=7)
-   -   What is best in life? Is it PARI/GP? (https://www.mersenneforum.org/showthread.php?t=23137)

JM Montolio A 2018-03-04 20:54

What is best in life? Is it PARI/GP?
 
¿ 200x faster that PARIGP ?

I believe PARIGP is unbeatable.

JM Montolio A 2018-03-05 12:02

Nothing about troll.Well.
I believe PARIGP is also writen on C/assembler. And is made with state of art algorithms.
I dont understand.

henryzz 2018-03-05 14:10

[QUOTE=JM Montolio A;481613]Nothing about troll.Well.
I believe PARIGP is also writen on C/assembler. And is made with state of art algorithms.
I dont understand.[/QUOTE]

PARIGP functions are written in C/assembler but the PARIGP code itself is interpreted

danaj 2018-03-05 17:16

[QUOTE=JM Montolio A;481613]Nothing about troll.Well.
I believe PARIGP is also writen on C/assembler. And is made with state of art algorithms.
I dont understand.[/QUOTE]

As henryzz said, PARI is written in C, but using it through GP involves parsing. It's not bad compared to other interfaces, and far more convenient to write / use. This is often a non-issue, but this particular task involves calling a parsed snippet ("s += log(p)") many, many times. The amount of actual work per call is relatively low.

Parts of PARI are close to state of the art, parts are quite old. Most of the parts I'm familiar with are very good but not state of the art. Factoring, primality testing, prime generation / looping, moebius/totient/etc., partition counting, ... all nice but significantly behind the state of the art. A lot of the functions could be optimized further for small (e.g. 32-bit or 64-bit) integer inputs, but at the expense of more convoluted code.

There is a lot to be said for packaging so much useful stuff that [I]works[/I], is decently fast, available on many platforms, isn't really fiddly like some state of the art stuff can be, and is open source.

JM Montolio A 2018-03-06 09:03

And then Whats the best tool for Number Theory?

paulunderwood 2018-03-06 09:30

[QUOTE=JM Montolio A;481670]And then Whats the best tool for Number Theory?[/QUOTE]

"Best" used here is subjective. It is very easy to concisely express ideas with PARI/GP's vast number of functions. Dana's number theory Perl module(s) may well be quicker for some calculations. Sometimes it is best to mix and match, for instance I have used GMP plus primesieve libraries with C/C++. :smile:

:direction:

JM Montolio A 2018-03-06 19:20

About "best in life?". For me is "Never stop trying."
I supose for you must be "Never stop trying... divisors."

:-)

CRGreathouse 2018-03-06 19:24

I split out these posts so as to keep danaj's thread on-topic.

[QUOTE=JM Montolio A;481721]About "best in life?"[/QUOTE]

The new thread name is a reference to
[url]https://www.youtube.com/watch?v=6PQ6335puOc[/url]

science_man_88 2018-03-06 19:40

Best would depend on algorithm and language version probably. You can write algorithms that get to the same result possibly tens, if not hundreds or thousands of ways ( some of these may have previous versions steps within them).

LaurV 2018-03-07 05:47

[QUOTE=CRGreathouse;481723]
The new thread name is a reference to
[/QUOTE]
Plagiarist! Wasn't that Genghis Khan, about "riding their horses and squeezing their women"? :razz:

axn 2018-03-07 06:00

[QUOTE=LaurV;481770]Plagiarist! Wasn't that Genghis Khan, about "riding their horses and squeezing their women"? :razz:[/QUOTE]

[url]https://www.imdb.com/title/tt0082198/quotes/qt0446932[/url]

LaurV 2018-03-08 06:26

[QUOTE=axn;481772][URL]https://www.imdb.com/title/tt0082198/quotes/qt0446932[/URL][/QUOTE]
[url]https://en.wikiquote.org/wiki/Genghis_Khan#Disputed[/url]


All times are UTC. The time now is 04:50.

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