/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.0Fortran Intel #2 7.857.85780513  0% 1% 1% 100%
1.0Fortran Intel #3 7.857.861,276638  0% 0% 0% 100%
1.0C gcc #5 7.867.86644569  0% 0% 0% 100%
1.0Fortran Intel 7.867.871,300568  0% 1% 0% 100%
1.0C++ g++ #5 7.927.939241044  0% 0% 0% 100%
1.0C++ g++ #6 7.927.939241044  1% 0% 1% 100%
1.2Ada 2005 GNAT #4 9.259.271,9002762  0% 1% 0% 100%
1.3C gcc #4 9.879.886441139  0% 0% 0% 100%
1.4ATS #4 10.6010.606082507  1% 0% 0% 100%
1.7C++ g++ #8 13.5413.556441278  0% 0% 0% 100%
2.0JavaScript V8 #2 15.7015.717,220328  0% 1% 1% 100%
2.0JavaScript V8 #3 15.7015.717,412373  0% 0% 0% 100%
2.0JavaScript V8 15.7015.717,504311  0% 0% 1% 100%
2.0Ada 2005 GNAT #3 15.7015.721,6361702  0% 0% 0% 100%
2.0Haskell GHC #4 15.7215.721,056984  0% 0% 0% 100%
2.0Lisp SBCL #2 15.7215.734,628906  0% 0% 0% 100%
2.0Go 15.7415.751,744411  0% 0% 0% 100%
2.0Pascal Free Pascal 15.7615.778423  0% 1% 0% 100%
2.0C gcc #3 15.7615.77644463  0% 0% 0% 100%
2.1Java 7  #2 16.1316.1414,924950  1% 0% 0% 100%
2.1Scala 16.5216.5318,484404  0% 1% 0% 100%
2.1Scala #2 16.7716.7718,764720  1% 0% 1% 100%
2.1Java 7  16.8716.8815,416514  1% 0% 0% 100%
2.3Lisp SBCL #3 17.9918.004,640883  0% 0% 0% 100%
2.4OCaml #2 18.8518.851,644377  0% 0% 0% 100%
2.4OCaml #3 17.9718.913,252938  0% 0% 0% 100%
2.5Dart 19.7119.7238,904477  0% 0% 0% 100%
2.6C gcc 20.6520.66364383  0% 0% 0% 100%
2.6ATS 20.6820.696081138  0% 0% 0% 100%
2.6Go #2 20.7520.761,256668  1% 0% 0% 100%
2.6Go #3 20.7720.781,888536  0% 0% 0% 100%
2.8Ada 2005 GNAT 21.7621.771,232710  0% 0% 0% 100%
2.9Racket #3 22.8822.8918,540627  0% 0% 0% 100%
3.1Lisp SBCL 24.7024.715,712625  0% 0% 0% 100%
3.6Racket #2 28.4228.4417,132532  0% 0% 0% 100%
3.6C++ g++ 28.4728.48872452  0% 0% 0% 100%
3.8C# Mono #2 29.4929.4914,1081063  0% 0% 0% 100%
3.9F# Mono #2 29.7430.5816,428852  0% 0% 0% 97%
3.9C# Mono 30.9830.9913,872459  0% 0% 0% 100%
4.0Racket 31.5731.5916,612446  0% 0% 1% 100%
5.7Haskell GHC #2 44.6044.623,692403  0% 0% 0% 100%
5.7Erlang HiPE #2 45.1245.1310,164747  0% 0% 0% 100%
6.5Clojure #6 51.2951.3270,744808  0% 0% 0% 100%
6.6Clojure #7 51.7551.7966,164762  0% 0% 0% 100%
7.5Erlang HiPE 59.1459.1613,652507  0% 0% 0% 100%
12Smalltalk VisualWorks #2 95.3495.4027,236438  0% 0% 0% 100%
28Perl 216.22216.313,640333  0% 0% 0% 100%
31Lua 243.58243.64940329  0% 0% 0% 100%
41Ruby JRuby #4 5 min5 min595,740326  0% 0% 0% 100%
47Ruby JRuby #2 6 min6 min595,764776  0% 0% 0% 100%
51PHP #2 6 min6 min4,612397  0% 0% 0% 100%
52PHP #3 6 min6 min14,2121193  0% 0% 1% 100%
53Ruby JRuby 6 min6 min595,616292  0% 0% 0% 100%
91Ruby 2.0 #3 11 min11 min25,120828  0% 0% 0% 100%
97Ruby 2.0 #4 12 min12 min5,536326  0% 0% 0% 100%
121Perl #2 15 min15 min2,784343  0% 0% 0% 100%
123Perl #3 16 min16 min7,320846  0% 0% 0% 100%
130Python 3 #6 16 min16 min5,208328  0% 0% 0% 100%
131Ruby 2.0 17 min17 min5,484292  0% 0% 0% 100%
138Python 3 #5 18 min18 min27,640437  0% 0% 0% 100%
146Python 3 #8 19 min19 min4,608449  0% 0% 0% 100%
180C CINT 23 min23 min6,180394  0% 0% 0% 100%
Scala #3 Failed982
Scala #4 Failed1006
"wrong" (different) algorithm / less comparable programs
0.5C gcc #2 3.763.77236,904669
1.1C++ g++ #7 8.308.319241283
1.5Python 3 #2 11.9211.93483,416233
2.1C++ g++ #2 16.3316.349241330

 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