Talk:Pierpont primes: Difference between revisions

Line 7:
 
:::: Essentially, this isn't going to help comparing &nbsp; (one of Rosetta Code's objectives) &nbsp; computer programming code, &nbsp; in this case, &nbsp; to find/display ginormous (Pierpont) primes, &nbsp; --- &nbsp; unless one has a robust &nbsp; '''isPrime''' &nbsp; function (mostly likely a BIF). &nbsp; There is nothing to learn about <u>using</u> an &nbsp; '''isPrime''' &nbsp; BIF. &nbsp; Otherwise, it's just an exercise in <strike>wasting</strike> consuming electric power. &nbsp; Interpretive computer programming languages will have a large/largish obstacle to overcome with a brute force approach. &nbsp; This shouldn't be the hurdle to jump over, just because interpretive languages have that handicap. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 05:52, 19 August 2019 (UTC)
 
:::::I don't know; for a very large percentage of the time, choosing the right algorithm makes a much bigger difference to how fast things get done than the execution speed of the underlying language. Yeah, having a good library can make things easier, but it's not everything. Personally, I think it can be very instructive to see how different languages deal with and/or work around difficult problems. Just for my own amusement, I went and re-implemented this using no built-in factoring, and no outside libraries. Uses a modified version of the [[Miller–Rabin_primality_test#Perl_6]] with 100 rounds (which is what the Perl 6 built-in factor routine uses). It still finishes in around 12 seconds on my system; slower than the ~6 seconds using built-ins and ~1.5 seconds using optimized libraries, but still, not too bad. And to be fair, Perl 6 has been called many thing, but blazin' fast is not usually one of them.
 
:::::Even in an on-line limited and throttled VM it finishes in (slightly) less than 30 seconds. <span style="background-color:yellow;">[https://tio.run/##lVRNb9pAED3Dr5gip7HBrIxJ2gSLKOohUg@VemhPhESbeF1cf6xlLwGU0D/WW/8YnV1sWBuUtIuQ1zPz3ny8XWcsjz9sNskKPnEeQzKPRQjF/AHC4j7Lw4SZn1MBRmqDekYwhoHjWKCtZ8iZmOcp3NC4YB6s26@wua8Q1dm@5fO3yLalwWLGcoZA4x6uwAWa@nJ7gtt1M9tzu4V8yuajDcF9GHh7Y4FGx2u3W4tZGDMZdCJ5ENbCvR8@jcH15EvR6@FzjZEBz8F0gZA7pLNIFj5GphFZ0L8CgyokkhtLJGbLLOG@aVAbiW0ZLTO1UrYUEAYqBssE5Ntuq@owRiYZbHMUirNVY1za4JaE6NLl0IiVL6aFlmzXP3ZyFPdOD5Ld6uK00SD1yEKWZxzHZxpilSG0gEeereTM5cSlqj@oQJHKF7kCGsbQ@Z5GKV@kIGEjUGgCX@ZY4gMDnuI/wLZNnwUU1bfkaNyOKk0lktUNXlCQilXQiKFcu4Bt25W3tEF/UIvQ8IWgAlXP@HB7Dhp26vt9WdUYhk3fdShYTgXP5QmauPaZfYFyEehOSeWxYTK0L233Y9OBCldkeFSuZ4zKs7ln/PObZPM4lqm10JjzTBtoiTYiJgevSEhGw7wgSZia0CVPNJ4zsAgGeAcojKlQE0kxrYdojlplW9Ox6nZqKOpeOW0cu6kbLPK@uswNrBRIBl6N92OvN6tWryfF8g4d@xqxumI2AnPyYppKF4skNBtBF39D6HaV3FapiaWJcsipptDTpMZ70RhI06vN5oBv11i3dqDkWrfru7W6a3QFnRuUVMC5A1@rW6fGV8irgncMAuWPwtQf3aYd@LW7nZO7c2dKco6lmQPHwkMVJMI8PbnwTy3yk4fpCDqI8Mo8t@lbmQr2yPFTeySV6Vr/nc09d8SskepIT1BryT27nP4bhV4sNGtVNJvNXw Try it online!]</span> I'm somewhat inclined to let it stand. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 13:22, 19 August 2019 (UTC)
 
== Final Digits ==
10,327

edits