Talk:Lucas-Lehmer test: Difference between revisions
Content added Content deleted
Line 396: | Line 396: | ||
May 2015 - fixed small bugs in both Python implementations. In the first, execution failed (Python 3) without a cast to int in the test. In the second, there was a typo - an 'r' should have been 's'. |
May 2015 - fixed small bugs in both Python implementations. In the first, execution failed (Python 3) without a cast to int in the test. In the second, there was a typo - an 'r' should have been 's'. |
||
: Timing for some solutions for 2..11213: |
|||
{| class="wikitable" |
|||
|- |
|||
! Time (s) |
|||
! Solution |
|||
|- |
|||
| 871.2 |
|||
| Python without optimizations |
|||
|- |
|||
| 314.7 |
|||
| Python with optimizations |
|||
|- |
|||
| 124.7 |
|||
| Perl Math::GMP without optimizations |
|||
|- |
|||
| 106.9 |
|||
| Pari/GP 2.8.0 |
|||
|- |
|||
| 61.8 |
|||
| Perl Math::GMP with optimization |
|||
|- |
|||
| 33.0 |
|||
| Python using gmpy2 (skipping non-primes) |
|||
|- |
|||
| 14.2 |
|||
| C/GMP with even more optimizations |
|||
|- |
|||
| 13.3 |
|||
| Perl Math::Prime::Util::GMP (source of C/GMP code) |
|||
|} |
|||
[[User:Danaj|Danaj]] ([[User talk:Danaj|talk]]) 19:49, 9 May 2015 (UTC) |