spectral-norm benchmark N=5,500

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

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.

    sortsortsort 
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Ruby JRuby 266.87267.33680,488292  0% 1% 1% 100%
1.0Ruby 6 min6 min7,632292  1% 0% 0% 100%
1.1Ruby JRuby #4 249.37249.79677,572326  0% 1% 1% 100%
1.1Ruby #4 5 min5 min9,108326  1% 0% 1% 100%
1.1Python 3 #6 13 min13 min6,480328  1% 0% 0% 100%
1.1Lua 190.00190.051,324329  1% 0% 0% 100%
1.1Perl 185.03185.095,352333  1% 0% 0% 100%
1.2Perl #5 181.04181.106,836340  1% 0% 0% 100%
1.2Perl #2 16 min16 min3,912343  1% 0% 0% 100%
1.2JavaScript V8 15.7115.7213,308344  1% 1% 0% 100%
1.2JavaScript V8 #2 15.7015.7113,196361  1% 0% 1% 100%
1.3OCaml #2 15.6915.693,012377  1% 1% 0% 100%
1.3C gcc 16.1316.141,044383  1% 1% 0% 100%
1.4PHP #2 7 min7 min7,284397  1% 0% 0% 100%
1.4Hack #2 53.1653.19119,432398  1% 1% 1% 100%
1.4Haskell GHC #2 22.7622.774,048403  0% 0% 1% 100%
1.4Scala 16.0216.0334,328404  1% 0% 1% 100%
1.4JavaScript V8 #3 15.7015.7113,240405  0% 1% 0% 100%
1.4Go 15.7015.701,288411  1% 0% 1% 100%
1.4JavaScript V8 #5 15.7015.7113,240418  1% 0% 0% 100%
1.4Pascal Free Pascal 15.7115.728423  1% 1% 0% 100%
1.5Python 3 #5 14 min14 min45,792437  1% 1% 0% 100%
1.5Smalltalk VisualWorks #2 91.0191.0552,544438  1% 1% 0% 100%
1.5Racket 39.8239.8420,976446  1% 0% 1% 100%
1.5C++ g++ 15.7015.701,512452  0% 1% 1% 100%
1.6C# Mono 21.9121.9239,864459  0% 0% 1% 100%
1.6C gcc #3 15.6915.691,748463  0% 0% 1% 100%
1.7Dart 15.9815.9929,896489  1% 0% 0% 100%
1.7Erlang HiPE 111.42111.4620,108507  1% 0% 0% 100%
1.8Fortran Intel #2 7.857.85776513  1% 0% 1% 100%
1.8Java  16.9616.9632,708514  0% 1% 1% 100%
1.8Dart #5 16.4116.4231,732518  1% 0% 0% 100%
1.8Racket #2 37.8237.8328,128532  1% 0% 1% 100%
1.8Go #3 15.7015.711,024536  0% 1% 1% 100%
1.9Fortran Intel 7.857.851,420568  0% 1% 0% 100%
1.9C gcc #5 7.857.851,692569  0% 1% 0% 100%
2.1Lisp SBCL 20.9220.939,280625  1% 1% 0% 100%
2.1Racket #3 20.5220.5333,180627  0% 1% 0% 100%
2.2Fortran Intel #3 7.857.851,344638  1% 1% 1% 100%
2.3Go #2 15.7015.701,024668  0% 0% 1% 100%
2.4Scala #5 16.3416.3545,456693  1% 1% 0% 100%
2.4Ada 2005 GNAT 15.6915.691,936710  0% 1% 0% 100%
2.5F# Mono #3 18.2519.1949,936720  1% 1% 0% 95%
2.6Erlang HiPE #2 70.1370.1619,404747  1% 0% 0% 100%
2.6Clojure #7 18.4218.4467,692762  1% 1% 0% 100%
2.7Ruby JRuby #2 279.66280.12681,104776  0% 1% 0% 100%
2.8Clojure #6 18.3018.3173,308808  1% 0% 1% 100%
2.8Ruby #3 6 min6 min40,204828  0% 1% 1% 100%
2.9Perl #3 14 min14 min10,184846  0% 1% 1% 100%
2.9F# Mono #2 22.5123.4247,964852  0% 1% 1% 96%
3.0Lisp SBCL #3 15.8815.8919,420883  2% 1% 1% 100%
3.1Lisp SBCL #2 15.8815.8919,424906  0% 0% 1% 100%
3.1Clojure #8 18.0018.0166,988918  1% 0% 0% 100%
3.2OCaml #3 15.8715.883,612938  1% 1% 0% 100%
3.3Java  #2 16.2216.2232,332950  0% 1% 1% 100%
3.4Haskell GHC #4 15.6915.701,564984  0% 1% 0% 100%
3.6C++ g++ #5 7.927.921,7361044  0% 1% 0% 100%
3.6C++ g++ #6 7.917.921,7481044  1% 1% 1% 100%
3.6C# Mono #2 21.9621.9742,5361063  1% 0% 1% 100%
3.9C gcc #4 8.508.501,7721139  0% 1% 0% 100%
4.1PHP #3 8 min8 min23,6161193  0% 1% 1% 100%
4.1Hack #3 55.8955.92120,2481195  1% 1% 0% 100%
4.4C++ g++ #8 7.857.851,6881278  0% 0% 1% 100%
5.8Ada 2005 GNAT #3 15.7015.724,1441702  1% 0% 0% 100%
9.5Ada 2005 GNAT #4 7.867.874,2602762  1% 1% 0% 100%
Perl #4 Failed551
Rust Make Error898
Scala #4 Failed1006
Scala #3 Failed982
Scala #2 Failed720
"wrong" (different) algorithm / less comparable programs
0.8Python 3 #2 7.507.51484,560233
1.3Python 3 #3 75.2675.411,197,896379
2.3C gcc #2 2.322.33237,956669
4.4C++ g++ #7 7.857.861,7521283
4.6C++ g++ #2 7.857.851,7481330

 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