/mobile Handheld Friendly website

 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.7115.718423  0% 0% 0% 100%
59C gcc 20.6920.69472383  0% 0% 1% 100%
94C++ g++ #6 10.0410.057521044  0% 0% 1% 100%
94C gcc #5 7.857.85752569  0% 0% 1% 100%
94C gcc #3 15.7015.71752463  0% 1% 0% 100%
94C++ g++ #8 10.6310.637521278  0% 0% 1% 100%
95C gcc #4 10.6110.617561139  1% 0% 1% 100%
95C++ g++ #5 10.0410.057561044  0% 0% 1% 100%
99Fortran Intel #2 7.847.85788513  1% 0% 0% 100%
135C++ g++ 20.7420.751,080452  0% 0% 0% 100%
155Go #2 15.7015.711,240668  0% 0% 1% 100%
161Lua 252.65252.721,288329  0% 0% 0% 100%
166Fortran Intel #3 7.857.861,324638  0% 0% 1% 100%
169Fortran Intel 7.847.851,348568  0% 0% 0% 100%
186Go 15.7115.721,484411  1% 0% 0% 100%
188Ada 2005 GNAT 21.7521.761,504710  0% 1% 0% 100%
199Haskell GHC #4 15.6915.701,588984  1% 0% 0% 100%
215Go #3 15.7015.711,716536  0% 1% 1% 100%
226OCaml #2 15.6815.691,808377  0% 0% 0% 100%
243Ada 2005 GNAT #4 7.867.871,9402762  0% 0% 1% 100%
243Ada 2005 GNAT #3 16.3016.321,9401702  0% 0% 1% 100%
286Rust 15.9515.962,288835  0% 1% 1% 100%
445OCaml #3 15.9216.723,556938  0% 0% 0% 100%
477Perl #2 15 min15 min3,816343  0% 0% 0% 100%
505Haskell GHC #2 22.7622.774,036403  0% 1% 0% 100%
672Perl 192.71192.785,372333  0% 0% 0% 100%
700Python 3 #8 16 min16 min5,600449  1% 0% 0% 100%
738Lisp SBCL #3 15.7115.725,904883  0% 0% 1% 100%
738Lisp SBCL #2 15.7115.725,904906  0% 1% 1% 100%
809Python 3 #6 12 min12 min6,468328  1% 0% 0% 100%
834Lisp SBCL 21.8321.846,668625  0% 0% 1% 100%
905PHP #2 7 min7 min7,240397  0% 0% 0% 100%
1,112Ruby 6 min6 min8,896292  0% 1% 0% 100%
1,160JavaScript V8 #2 15.7015.719,280328  0% 1% 1% 100%
1,180JavaScript V8 15.7115.719,436311  0% 1% 1% 100%
1,180JavaScript V8 #3 15.7115.719,436373  1% 0% 0% 100%
1,188Ruby #4 5 min5 min9,504326  0% 1% 0% 100%
1,199Perl #3 14 min14 min9,592846  0% 0% 0% 100%
1,773Erlang HiPE #2 46.3546.3714,180747  0% 0% 0% 100%
1,828Erlang HiPE 59.0759.0914,624507  0% 0% 0% 100%
1,960C# Mono #2 21.8421.8415,6761063  0% 0% 1% 100%
1,982C# Mono 21.8421.8515,856459  0% 1% 1% 100%
2,451F# Mono #2 22.1123.1019,604852  1% 0% 0% 96%
2,484Racket 40.1740.1819,868446  0% 0% 1% 100%
2,644Java  17.0917.1021,152514  0% 0% 1% 100%
2,678Java  #2 17.5117.5121,424950  0% 1% 1% 100%
2,922Racket #2 37.7837.8023,372532  0% 1% 1% 100%
2,952Scala 17.5417.5523,616404  0% 1% 0% 100%
3,055PHP #3 7 min7 min24,4361193  0% 0% 0% 100%
3,176Scala #2 17.5917.6025,408720  0% 1% 1% 100%
3,272Racket #3 20.6020.6126,176627  0% 1% 0% 100%
5,328Ruby #3 6 min6 min42,620828  1% 1% 0% 100%
5,360Smalltalk VisualWorks #2 91.0391.0542,880438  0% 0% 0% 100%
5,454Python 3 #5 13 min13 min43,632437  0% 1% 1% 100%
6,548Dart 22.0222.0352,380457  0% 0% 1% 100%
7,050Hack #2 68.8368.8656,400398  1% 0% 0% 100%
7,412Clojure #7 18.5218.5359,292762  0% 1% 0% 100%
7,546Clojure #6 18.2918.3060,368808  0% 0% 1% 100%
23,660Hack #3 72.3672.39189,2801195  0% 1% 0% 100%
82,490Ruby JRuby #4 250.16250.58659,920326  0% 1% 0% 100%
82,971Ruby JRuby 274.62275.09663,764292  0% 1% 1% 100%
83,710Ruby JRuby #2 5 min5 min669,680776  0% 1% 1% 100%
Perl #4 Failed551
Scala #4 Failed1006
Scala #3 Failed982
"wrong" (different) algorithm / less comparable programs
94C++ g++ #7 8.428.427521283
95C++ g++ #2 7.857.857561330
29,626C gcc #2 3.743.75237,004669
61,072Python 3 #2 11.0411.05488,572233
149,779Python 3 #3 96.1796.751,198,228379

 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