/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 gcc #5 7.871.98748569  99% 99% 99% 100%
1.0Fortran Intel #3 7.982.001,328638  100% 100% 100% 100%
1.0Fortran Intel 7.912.011,348568  99% 99% 99% 99%
1.0Ada 2005 GNAT #4 7.892.011,9402762  98% 99% 99% 99%
1.3C++ g++ #5 10.022.524921044  100% 100% 100% 100%
1.3C++ g++ #6 10.022.524921044  100% 100% 100% 100%
1.4C++ g++ #8 10.652.674961278  100% 100% 100% 100%
1.4C gcc #4 10.682.684961139  100% 100% 100% 100%
1.4ATS #4 10.652.717202507  99% 97% 99% 99%
2.0C gcc #3 15.803.96748463  100% 100% 100% 100%
2.0Lisp SBCL #3 15.754.025,860883  98% 98% 98% 98%
2.0Lisp SBCL #2 15.754.025,848906  98% 98% 99% 98%
2.0Haskell GHC #4 15.704.041,584984  97% 98% 95% 100%
2.1Go #2 15.734.071,508668  96% 97% 99% 96%
2.2Ada 2005 GNAT #3 16.954.361,9401702  94% 98% 99% 99%
2.2OCaml #3 16.584.393,504938  99% 98% 99% 99%
2.3Java 7  #2 17.614.5117,540950  97% 97% 99% 98%
2.3Scala #2 17.754.6323,308720  95% 95% 95% 99%
2.7Racket #3 20.635.4325,932627  94% 97% 94% 95%
2.8Clojure #6 18.755.5158,160808  85% 89% 86% 81%
2.8Clojure #7 18.765.5150,760762  82% 82% 92% 83%
2.8C# Mono #2 21.925.6015,4601063  98% 98% 98% 99%
3.7Go #3 15.817.282,012536  47% 49% 58% 64%
3.7F# Mono #2 22.247.3018,320852  76% 76% 73% 79%
4.0Fortran Intel #2 7.857.85788513  1% 0% 0% 100%
6.1Erlang HiPE #2 47.4812.0922,836747  99% 98% 98% 98%
7.9OCaml #2 15.6915.701,800377  0% 0% 0% 100%
7.9Go 15.7115.711,772411  91% 0% 0% 9%
7.9Pascal Free Pascal 15.7115.728423  34% 0% 0% 66%
8.6Java 7  17.0216.9818,316514  0% 0% 100% 0%
8.8Scala 17.8117.4722,688404  1% 1% 100% 2%
10C gcc 20.7020.71464383  0% 0% 0% 100%
10ATS 20.7020.717161138  0% 100% 0% 0%
10C++ g++ 20.7620.761,076452  0% 0% 0% 100%
11Ada 2005 GNAT 21.7621.771,504710  84% 0% 0% 16%
11C# Mono 21.8621.8714,360459  0% 0% 0% 100%
11Dart 22.1722.1841,580477  0% 0% 0% 100%
13Lisp SBCL 25.4425.456,700625  0% 0% 100% 0%
19Erlang #2 145.6136.7816,772747  99% 99% 99% 99%
19Haskell GHC #2 112.3637.707,076403  66% 66% 66% 100%
19Racket #2 37.8337.8320,816532  0% 0% 0% 100%
20Racket 40.2340.2319,472446  95% 5% 0% 0%
29Erlang HiPE 56.7756.7817,920507  75% 25% 0% 0%
53PHP #3 6 min105.7323,9121193  99% 99% 98% 98%
54Ruby 2.0 #3 6 min107.2933,912828  95% 94% 94% 93%
102Perl 200.90200.975,516333  0% 0% 0% 100%
102Python 3 #5 13 min202.5439,668437  99% 99% 100% 99%
112Ruby JRuby #2 14 min221.50621,196776  98% 98% 99% 98%
113Erlang 222.95223.0319,936507  90% 10% 0% 0%
119Perl #3 15 min235.3610,404846  100% 100% 100% 100%
130Ruby JRuby #4 261.20258.09625,796326  0% 47% 54% 1%
157Ruby JRuby 5 min5 min625,052292  1% 1% 29% 71%
160Ruby 2.0 #4 5 min5 min7,736326  58% 40% 2% 0%
199Ruby 2.0 6 min6 min6,540292  1% 3% 2% 100%
203PHP #2 6 min6 min7,172397  0% 0% 0% 100%
398Python 3 #6 13 min13 min7,092328  99% 0% 0% 1%
470Python 3 #8 15 min15 min6,220449  0% 84% 16% 0%
473Perl #2 15 min15 min3,972343  85% 15% 0% 0%
Scala #4 Failed1006
Scala #3 Failed982
"wrong" (different) algorithm / less comparable programs
1.0C++ g++ #2 7.911.994921330
1.1C++ g++ #7 8.472.134961283
2.0C gcc #2 4.004.01237,004669
5.7Python 3 #2 11.1711.19486,156233

 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