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%
46C gcc 20.7320.74364383  0% 100% 1% 1%
48C gcc #4 10.672.683801139  100% 100% 100% 100%
81C gcc #3 15.743.95644463  100% 100% 100% 100%
81C gcc #5 7.901.99644569  100% 100% 100% 100%
81C++ g++ #8 13.533.406441278  100% 100% 100% 100%
98Fortran Intel #2 7.857.86780513  1% 1% 2% 100%
109C++ g++ 28.4628.48872452  0% 100% 1% 1%
116C++ g++ #6 7.972.019241044  100% 100% 100% 100%
116C++ g++ #5 7.972.009241044  100% 100% 100% 100%
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%
152Ada 2005 GNAT 21.7621.761,212710  1% 0% 1% 100%
162Fortran Intel #3 7.912.001,296638  99% 99% 99% 99%
165Fortran Intel 7.932.001,316568  99% 99% 100% 99%
178Haskell GHC #4 15.704.041,420984  97% 97% 97% 98%
202Ada 2005 GNAT #3 15.723.981,6161702  99% 99% 99% 99%
208OCaml #2 18.8518.861,660377  1% 0% 0% 100%
235Ada 2005 GNAT #4 9.402.401,8802762  99% 98% 97% 98%
385Perl #2 17 min17 min3,076343  99% 0% 0% 1%
404OCaml #3 18.245.273,232938  87% 97% 95% 85%
473Haskell GHC #2 106.4836.423,784403  63% 65% 65% 100%
483Perl 229.81229.893,860333  96% 0% 0% 4%
542Python 3 #8 17 min17 min4,336449  0% 0% 1% 100%
586PHP #2 6 min6 min4,688397  0% 0% 1% 100%
598Rust #2 15.7015.714,784485  1% 0% 0% 100%
623Rust #3 17.764.544,9801020  98% 98% 98% 98%
627Python 3 #6 15 min15 min5,012328  0% 9% 91% 1%
752Ruby #4 10 min10 min6,016326  28% 1% 72% 1%
753Ruby 11 min11 min6,024292  1% 1% 1% 100%
848Perl #4 212.5754.356,780551  97% 98% 98% 99%
997Perl #3 17 min269.367,976846  100% 99% 99% 100%
1,340Lisp SBCL 23.9123.9210,720625  1% 1% 0% 100%
1,797PHP #3 7 min108.8614,3721193  99% 99% 99% 99%
1,936Dart 16.1616.0615,484457  0% 1% 1% 100%
2,112Racket 31.1431.1316,892446  0% 1% 100% 0%
2,238Racket #2 28.1728.1717,904532  0% 0% 9% 92%
2,239Lisp SBCL #2 15.934.1517,912906  96% 96% 97% 97%
2,380C# Mono #2 31.608.0919,0361063  98% 97% 98% 98%
2,435C# Mono 29.4729.4819,476459  1% 1% 0% 100%
2,443Racket #3 22.946.0019,540627  95% 95% 98% 95%
2,508Java  #2 16.564.3020,064950  95% 96% 99% 96%
2,524Lisp SBCL #3 23.906.1520,192883  97% 97% 97% 98%
2,613Erlang HiPE #2 71.4518.1920,904747  98% 98% 98% 99%
2,676Scala 16.0515.9721,408404  1% 1% 99% 2%
2,747F# Mono #2 31.489.6821,972852  78% 82% 83% 83%
2,977Java  16.4816.4123,812514  1% 100% 1% 0%
3,470Ruby #3 11 min175.9127,760828  96% 96% 96% 97%
3,783Python 3 #5 17 min258.4230,260437  99% 99% 99% 99%
3,936Erlang HiPE 114.35114.3831,488507  0% 100% 0% 1%
4,677Rust 19.226.9037,412811  71% 70% 70% 69%
6,151Clojure #8 42.1611.2549,204918  92% 92% 94% 97%
6,205Clojure #6 42.3811.4649,636808  90% 97% 92% 91%
6,220Clojure #7 42.8811.5849,756762  92% 95% 93% 91%
77,497Ruby JRuby #4 277.05271.29619,976326  19% 43% 24% 18%
80,547Ruby JRuby 6 min5 min644,372292  23% 29% 25% 27%
80,547Ruby JRuby #2 16 min258.29644,372776  99% 98% 98% 98%
Scala #2 Failed720
Scala #3 Failed982
Scala #4 Failed1006
"wrong" (different) algorithm / less comparable programs
80C++ g++ #2 16.644.196401330
116C++ g++ #7 8.072.039241283
29,601C gcc #2 2.282.28236,808669
59,971Python 3 #2 12.1512.16479,764233
119,669Python 3 #3 101.30101.81957,348379

 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