spectral-norm benchmark N=5,500

Each chart bar shows how many times more Memory, one ↓ spectral-norm program used, compared to the program that used least Memory.

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.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Pascal Free Pascal 15.7615.778423  1% 1% 0% 100%
98Fortran Intel #2 7.867.87784513  0% 2% 100% 0%
110C gcc 16.2816.28876383  0% 0% 100% 0%
128Go 20.8020.801,024411  1% 0% 100% 1%
128Go #3 15.703.951,024536  99% 99% 99% 100%
137Go #2 15.814.161,096668  96% 95% 96% 94%
153C++ g++ 29.1729.181,224452  1% 1% 2% 100%
174Haskell GHC #4 16.084.151,392984  95% 97% 99% 97%
194C++ g++ #8 13.183.311,5481278  100% 100% 100% 100%
196C gcc #4 7.881.981,5681139  99% 99% 99% 99%
204Ada 2005 GNAT 15.9515.951,628710  0% 0% 100% 1%
207OCaml #2 18.8518.861,656377  0% 1% 1% 100%
213C gcc #5 7.861.981,704569  99% 100% 99% 99%
214C gcc #3 15.723.941,708463  100% 100% 100% 100%
253C++ g++ #5 7.952.002,0201044  100% 100% 100% 100%
253C++ g++ #6 7.962.002,0241044  100% 100% 100% 100%
386Perl #2 17 min17 min3,088343  1% 0% 100% 1%
399OCaml #3 18.145.103,192938  93% 93% 95% 93%
484Ada 2005 GNAT #4 9.362.373,8682762  99% 99% 99% 99%
492Perl 226.90226.983,936333  1% 1% 0% 100%
495Ada 2005 GNAT #3 16.134.083,9561702  100% 99% 98% 99%
586PHP #2 7 min7 min4,688397  0% 100% 1% 1%
623Python 3 #6 15 min15 min4,980328  97% 1% 4% 0%
673Fortran Intel #3 7.911.995,384638  100% 99% 100% 100%
680Fortran Intel 7.921.995,440568  99% 100% 100% 100%
684Perl #5 211.13211.195,468340  1% 100% 0% 0%
727Ruby #4 9 min9 min5,812326  1% 0% 65% 36%
831Perl #4 211.8054.416,644551  97% 98% 96% 98%
839Ruby 10 min10 min6,712292  0% 1% 24% 77%
1,024Perl #3 17 min267.098,192846  100% 99% 99% 100%
1,235Haskell GHC #2 112.1837.849,880403  66% 65% 100% 66%
1,272Lisp SBCL 23.3923.4010,176625  0% 0% 100% 0%
1,767PHP #3 7 min110.1814,1361193  99% 99% 100% 99%
2,222Lisp SBCL #2 15.944.1317,772906  96% 97% 97% 97%
2,418Racket #2 28.5028.4919,344532  0% 0% 1% 100%
2,483Erlang HiPE 148.31148.3519,864507  6% 0% 0% 94%
2,509Lisp SBCL #3 23.936.1720,072883  97% 97% 97% 97%
2,515Erlang HiPE #2 83.0324.2920,116747  85% 85% 86% 86%
2,528Dart #5 16.1616.0120,220518  1% 9% 92% 1%
2,528Dart 16.2416.0920,220489  1% 100% 0% 1%
2,642Racket 31.2831.2721,136446  0% 0% 1% 100%
2,702Racket #3 22.945.9921,612627  96% 95% 95% 97%
3,203Ruby #3 10 min168.1425,624828  96% 97% 97% 97%
3,306Java  16.9916.9126,444514  100% 0% 1% 1%
3,310Java  #2 16.534.3026,476950  99% 96% 95% 96%
3,518Scala 16.0715.9828,140404  100% 1% 1% 1%
3,790Python 3 #5 16 min252.9230,320437  99% 100% 99% 99%
4,305Scala #5 16.404.4034,436693  92% 93% 97% 92%
4,802C# Mono #2 31.688.1738,4121063  97% 97% 98% 97%
4,891C# Mono 29.5429.5539,124459  100% 0% 1% 0%
5,354F# Mono #2 31.749.9042,832852  77% 77% 81% 87%
5,427F# Mono #3 18.276.5443,412720  66% 69% 73% 72%
6,641Clojure #7 44.9412.1653,128762  91% 91% 91% 98%
6,674Clojure #6 41.6411.3553,388808  93% 93% 91% 90%
6,743Clojure #8 42.4011.3753,944918  96% 92% 92% 94%
80,998Ruby JRuby 6 min6 min647,980292  25% 24% 27% 27%
81,145Ruby JRuby #4 295.36288.54649,160326  26% 28% 23% 28%
82,123Ruby JRuby #2 16 min258.84656,984776  97% 98% 97% 98%
Rust Make Error898
Scala #2 Failed720
Scala #3 Failed982
Scala #4 Failed1006
"wrong" (different) algorithm / less comparable programs
200C++ g++ #2 17.284.341,6001330
255C++ g++ #7 8.542.152,0401283
29,725C gcc #2 2.322.32237,796669
59,973Python 3 #2 8.528.53479,784233
119,652Python 3 #3 75.4975.59957,216379

 spectral-norm benchmark : Eigenvalue using the power method

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

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

Each program must implement 4 separate functions / procedures / methods like the C# program.

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