spectral-norm benchmark N=550

Each chart bar shows how many times slower, one ↓ spectral-norm program was, compared to the fastest program.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

    sort sortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Python 2 #2 0.080.08?394  0% 0% 100% 0%
1.0Python 2 #2 0.080.08?394  0% 0% 100% 0%
1.8Python 3 #2 0.140.15?394  0% 100% 0% 0%
1.8Python 3 #2 0.150.15?394  100% 0% 0% 0%
1.9Python 3 #2 0.150.16?394  69% 29% 0% 0%
2.0PyPy 3 #8 0.160.16?594  0% 0% 0% 100%
2.0PyPy 3 #8 0.170.17?594  0% 0% 100% 0%
2.1PyPy 3 #8 0.170.17?594  0% 0% 0% 100%
2.1Python 2 #2 0.090.17?394  16% 59% 6% 35%
2.3PyPy 2 #8 0.180.18?594  5% 100% 0% 0%
2.3PyPy 2 #8 0.180.18?594  100% 0% 0% 0%
2.3PyPy 2 #8 0.190.19?594  0% 0% 100% 0%
3.8PyPy 2 #6 0.300.301,552498  0% 0% 100% 0%
3.8PyPy 2 #6 0.310.311,556498  0% 34% 67% 6%
3.9PyPy 2 #6 0.310.311,556498  0% 0% 100% 0%
4.3Python development version #2 0.340.351,652394  3% 0% 3% 100%
4.4Python development version #2 0.350.36856394  3% 3% 6% 97%
4.4Python development version #2 0.350.361,648394  17% 83% 6% 0%
4.5PyPy 3 #6 0.360.361,276498  3% 0% 100% 0%
4.6PyPy 3 #6 0.370.371,348498  3% 100% 0% 5%
4.8PyPy 3 #6 0.380.391,280498  21% 100% 3% 5%
5.4Python 3 #3 0.440.4436,548642  2% 2% 98% 0%
5.4Python 3 #3 0.440.4436,960642  0% 5% 0% 100%
5.5Nuitka #3 0.440.4436,664642  100% 0% 2% 5%
5.7Nuitka #3 0.460.4637,224642  2% 100% 2% 2%
5.8Python 3 #3 0.470.4736,720642  2% 0% 100% 0%
6.5Nuitka #3 0.480.5233,216642  2% 6% 10% 79%
8.0Python development version #3 0.650.6538,024642  2% 5% 2% 100%
8.2Python development version #3 0.660.6632,048642  87% 0% 14% 6%
10Python development version #3 0.690.8238,068642  77% 21% 7% 2%
12PyPy 2 #5 1.780.9785,076595  41% 61% 45% 38%
12PyPy 2 #5 1.860.9883,740595  64% 47% 38% 41%
12PyPy 2 #5 1.860.9884,416595  46% 61% 46% 42%
19PyPy 3 #5 3.151.5684,856575  39% 75% 43% 46%
21PyPy 3 #5 3.061.6784,788575  44% 41% 60% 38%
21PyPy 3 #5 3.231.6982,016575  43% 45% 72% 36%
27Cython #5 7.792.1755,920575  90% 89% 90% 92%
27Cython #5 7.802.1855,412575  90% 90% 94% 90%
27Cython #5 7.772.1855,396575  89% 90% 92% 89%
27Pyston #5 7.492.20162,788595  92% 85% 83% 84%
27Pyston #5 7.502.20162,628595  84% 91% 85% 84%
27Pyston #5 7.712.21192,684595  86% 90% 95% 87%
30Pyston #8 2.432.4428,712594  100% 1% 4% 6%
31Pyston #8 2.482.4936,292594  3% 2% 100% 1%
31Pyston #8 2.492.4928,872594  7% 100% 3% 6%
33Cython #6 2.642.648,944498  100% 0% 1% 2%
33Cython #6 2.652.668,864498  2% 0% 0% 100%
33Cython #6 2.662.678,872498  0% 83% 0% 19%
36Python 2 #5 10.672.9443,812595  94% 94% 93% 94%
36Pyston #6 2.942.9428,576498  1% 100% 1% 1%
36Python 2 #5 10.632.9446,536595  94% 93% 93% 95%
37Pyston #6 2.952.9628,900498  54% 3% 48% 1%
38Python 2 #5 10.603.0544,712595  94% 94% 93% 94%
38Pyston #6 3.053.0635,996498  100% 2% 2% 1%
39Nuitka #5 10.053.1260,552575  91% 94% 91% 94%
39Nuitka #5 9.903.1960,472575  89% 97% 89% 93%
40Python 3 #5 12.453.2854,880575  95% 96% 94% 95%
40Python 3 #5 12.423.2855,704575  95% 95% 94% 96%
42Python 3 #5 12.573.3755,328575  92% 94% 93% 95%
42Nuitka #5 9.833.4262,604575  92% 92% 91% 93%
43Cython #8 3.483.489,012594  100% 0% 0% 1%
43Cython #8 3.493.508,960594  100% 0% 1% 2%
43Cython #8 3.503.508,952594  100% 0% 1% 2%
48Nuitka #8 3.863.8610,512594  2% 100% 1% 1%
48Nuitka #8 3.893.8910,492594  3% 100% 2% 4%
48Nuitka #8 3.923.9210,600594  3% 4% 3% 100%
49Python 2 #6 3.973.986,156498  2% 3% 100% 1%
49Python 2 #6 4.004.006,260498  100% 4% 2% 2%
50Python 2 #6 4.014.016,296498  5% 100% 1% 1%
50Nuitka #6 4.024.0310,460498  1% 1% 0% 100%
50Nuitka #6 4.074.0710,476498  3% 100% 3% 3%
50Nuitka #6 4.074.0710,300498  100% 0% 1% 1%
52Python development version #5 15.554.1852,796575  96% 97% 95% 95%
52Python development version #5 15.574.1854,808575  96% 97% 95% 95%
54Python development version #5 15.884.3853,016575  94% 95% 94% 92%
57Python 2 #8 4.594.606,388594  3% 5% 6% 100%
58Python 2 #8 4.674.676,388594  4% 100% 1% 5%
58Python 3 #6 4.704.708,632498  0% 100% 0% 0%
58Python 3 #6 4.724.728,788498  0% 100% 0% 0%
58Python 3 #6 4.724.728,828498  100% 0% 1% 0%
59IronPython #8 4.834.8058,992594  1% 98% 1% 2%
59IronPython #8 4.774.8059,084594  1% 43% 1% 54%
59IronPython #8 4.794.8156,908594  6% 1% 92% 1%
60Python 2 #8 4.824.826,376594  100% 3% 4% 0%
67Python development version #6 5.465.467,384498  100% 4% 1% 1%
68Python development version #6 5.505.507,376498  3% 2% 100% 2%
69Python development version #6 5.565.567,452498  3% 100% 2% 3%
70Python 3 #8 5.645.648,952594  0% 0% 1% 100%
70Python 3 #8 5.655.658,852594  100% 0% 0% 0%
70IronPython #6 5.415.6971,792498  19% 73% 2% 2%
70IronPython #6 5.425.7069,920498  1% 19% 2% 75%
70IronPython #6 5.475.7069,920498  80% 2% 2% 14%
74Python 3 #8 6.016.018,912594  100% 0% 1% 0%
94Python development version #8 7.617.617,544594  3% 3% 100% 3%
95Python development version #8 7.667.677,580594  100% 3% 1% 2%
98Python development version #8 7.937.947,544594  62% 3% 4% 40%
103MicroPython #6 8.368.364,476498  2% 1% 1% 100%
105MicroPython #6 8.478.474,320498  2% 100% 2% 2%
106MicroPython #6 8.568.564,320498  4% 100% 3% 3%
114Jython #8 15.369.24293,044594  54% 39% 47% 55%
117Jython #8 15.939.45290,604594  61% 42% 57% 47%
117Jython #8 15.999.47292,300594  47% 63% 51% 42%
146Jython #6 17.8211.83291,360498  51% 40% 40% 38%
162Jython #6 18.8913.13278,060498  76% 39% 44% 47%
165Jython #6 19.0413.35275,300498  62% 46% 49% 64%
191Numba 2.4815.4594,924663  100% 100% 100% 100%
195Numba 2.4415.7695,524663  100% 100% 100% 100%
205Numba 2.5416.5993,528663  100% 100% 100% 100%
missing benchmark programs
Shedskin No program
Grumpy No program

 spectral-norm benchmark : Eigenvalue using the power method

diff program output N = 100 with this output file to check your program is correct before contributing.

We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

Each program should calculate the spectral norm of an infinite matrix A, with entries a11=1, a12=1/2, a21=1/3, a13=1/4, a22=1/5, a31=1/6, etc

For more information see challenge #3 in Eric W. Weisstein, "Hundred-Dollar, Hundred-Digit Challenge Problems" and "Spectral Norm".

From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/Hundred-DollarHundred-DigitChallengeProblems.html
http://mathworld.wolfram.com/SpectralNorm.html

Thanks to Sebastien Loisel for this benchmark.

Revised BSD license

  Home   Conclusions   License   Play