/mobile Handheld Friendly website

 spectral-norm benchmark N=5,500

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.0C++ g++ #6 7.962.009241044  100% 100% 100% 100%
1.0Fortran Intel 7.932.001,316568  99% 99% 100% 99%
1.0Fortran Intel #3 7.912.001,296638  99% 99% 99% 99%
1.0C++ g++ #5 7.982.019241044  100% 100% 100% 100%
1.0C gcc #5 8.022.02644569  100% 100% 100% 100%
1.2Ada 2005 GNAT #4 9.362.391,9002762  99% 98% 98% 99%
1.2C gcc #4 9.932.506441139  100% 100% 100% 100%
1.3ATS #4 10.612.706082507  99% 99% 99% 97%
1.7C++ g++ #8 13.563.416441278  100% 100% 100% 100%
2.0Ada 2005 GNAT #3 15.743.991,6361702  99% 99% 98% 99%
2.0C gcc #3 15.984.02644463  100% 99% 100% 100%
2.0Lisp SBCL #2 15.754.024,488906  98% 98% 99% 98%
2.0Haskell GHC #4 15.724.061,248984  97% 97% 97% 97%
2.1Java 7  #2 16.394.2114,740950  97% 97% 98% 99%
2.2Scala #2 17.044.4718,772720  94% 94% 94% 99%
2.3Lisp SBCL #3 18.024.584,604883  98% 99% 98% 99%
2.4OCaml #3 17.994.793,092938  99% 99% 99% 99%
2.7Go #2 20.795.321,496668  98% 98% 99% 97%
3.0Racket #3 22.945.9718,520627  96% 96% 96% 98%
3.9Fortran Intel #2 7.857.86780513  1% 1% 2% 100%
4.1C# Mono #2 30.308.3016,3921063  94% 93% 89% 90%
4.9Go #3 20.889.891,820536  37% 79% 53% 43%
5.0F# Mono #2 30.7110.0918,720852  75% 88% 71% 72%
5.7Erlang HiPE #2 45.0111.5114,436747  99% 98% 98% 98%
7.8Clojure #6 54.5215.6670,732808  88% 87% 89% 86%
7.9Go 15.7515.751,740411  0% 100% 0% 0%
7.9Pascal Free Pascal 15.7715.778423  0% 100% 1% 1%
7.9Clojure #7 55.3715.8070,508762  88% 87% 88% 89%
8.1Scala 16.5316.2318,188404  0% 0% 2% 100%
8.4Java 7  16.9016.8515,236514  1% 0% 1% 100%
9.4OCaml #2 18.8518.861,644377  0% 0% 0% 100%
10Dart 20.0420.0538,900477  0% 0% 100% 0%
10C gcc 20.6520.66364383  92% 0% 0% 8%
10ATS 20.6820.696081138  0% 0% 100% 0%
11Ada 2005 GNAT 21.7621.781,232710  97% 0% 0% 3%
12Lisp SBCL 24.7024.715,716625  0% 0% 0% 100%
14Racket #2 28.3128.3117,124532  0% 0% 100% 0%
14C++ g++ 28.4728.49872452  0% 0% 100% 0%
15Racket 31.0331.0216,568446  1% 0% 0% 100%
16C# Mono 31.6831.6916,556459  0% 100% 0% 0%
21Haskell GHC #2 126.5741.296,496403  69% 69% 69% 100%
28Erlang HiPE 56.6856.6914,912507  100% 0% 0% 0%
52PHP #3 6 min103.8914,2321193  98% 98% 98% 99%
93Ruby 2.0 #3 11 min186.3425,092828  97% 95% 96% 96%
100Ruby JRuby #2 12 min199.43597,500776  98% 97% 97% 98%
115Perl 229.81229.893,860333  96% 0% 0% 4%
134Python 3 #5 17 min268.3227,732437  99% 99% 99% 99%
134Perl #3 17 min269.367,976846  100% 99% 99% 100%
161Ruby JRuby #4 5 min5 min600,116326  50% 1% 1% 50%
212Ruby JRuby 7 min7 min599,536292  22% 27% 28% 25%
218PHP #2 7 min7 min4,792397  0% 0% 0% 100%
390Ruby 2.0 #4 13 min13 min5,536326  0% 100% 0% 0%
492Python 3 #6 16 min16 min5,204328  48% 33% 0% 20%
511Ruby 2.0 17 min17 min5,528292  30% 36% 35% 0%
533Perl #2 17 min17 min3,076343  99% 0% 0% 1%
571Python 3 #8 19 min19 min4,608449  90% 10% 0% 0%
Scala #3 Failed982
Scala #4 Failed1006
"wrong" (different) algorithm / less comparable programs
1.0C++ g++ #7 8.062.039241283
2.0C gcc #2 3.983.99236,904669
2.1C++ g++ #2 16.444.139241330
6.0Python 3 #2 11.9111.93481,840233

 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

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