/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%
58C gcc 20.6920.70464383  0% 0% 0% 100%
90ATS 20.7020.707201138  0% 0% 0% 100%
90ATS #4 10.6310.637202507  0% 0% 0% 100%
94C gcc #4 10.6610.667481139  0% 0% 0% 100%
94C++ g++ #5 9.9910.007481044  0% 0% 0% 100%
94C gcc #5 7.857.86752569  0% 0% 1% 100%
94C++ g++ #6 9.9910.007521044  0% 0% 0% 100%
94C gcc #3 15.7715.78752463  0% 0% 0% 100%
94C++ g++ #8 10.6010.617521278  0% 0% 0% 100%
99Fortran Intel #2 7.847.85788513  1% 0% 0% 100%
135C++ g++ 20.7520.761,076452  0% 0% 0% 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%
183Haskell GHC #4 15.6915.701,460984  0% 0% 0% 100%
188Ada 2005 GNAT 21.7521.761,500710  0% 0% 0% 100%
191Go #2 15.7015.711,528668  0% 0% 0% 100%
222Go 15.7215.721,776411  0% 0% 0% 100%
225OCaml #2 15.6915.691,796377  0% 0% 0% 100%
242Ada 2005 GNAT #4 7.867.881,9362762  0% 0% 0% 100%
243Ada 2005 GNAT #3 16.8116.831,9401702  0% 0% 0% 100%
283Go #3 15.7015.712,260536  0% 0% 0% 100%
441OCaml #3 15.9216.673,528938  0% 0% 0% 100%
477Perl #2 15 min15 min3,816343  0% 0% 0% 100%
547Haskell GHC #2 37.6837.694,376403  0% 0% 0% 100%
672Perl 192.71192.785,372333  0% 0% 0% 100%
746Lisp SBCL #2 15.7115.725,968906  0% 0% 0% 100%
747Lisp SBCL #3 15.7115.725,972883  0% 0% 0% 100%
778Python 3 #8 16 min16 min6,224449  0% 0% 0% 100%
800Ruby 2.0 6 min6 min6,396292  0% 0% 0% 100%
838Lisp SBCL 25.4325.446,700625  0% 0% 0% 100%
887Python 3 #6 13 min13 min7,096328  0% 0% 0% 100%
897PHP #2 6 min6 min7,172397  0% 0% 0% 100%
967Ruby 2.0 #4 5 min5 min7,732326  0% 0% 0% 100%
1,059JavaScript V8 #2 55.7855.808,472328  0% 0% 0% 100%
1,060JavaScript V8 #3 22.2822.298,480373  0% 0% 0% 100%
1,069JavaScript V8 22.3422.358,548311  0% 0% 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,796C# Mono 21.8521.8614,368459  0% 0% 0% 100%
1,828Erlang HiPE 59.0759.0914,624507  0% 0% 0% 100%
1,872C# Mono #2 21.8621.8714,9721063  0% 0% 0% 100%
2,195Java 7  #2 17.5317.5417,560950  0% 0% 0% 100%
2,280F# Mono #2 22.1423.1418,236852  0% 0% 0% 96%
2,290Java 7  17.0017.0018,320514  0% 0% 0% 100%
2,428Racket 39.9639.9819,420446  0% 0% 0% 100%
2,602Racket #2 37.7837.8020,812532  0% 0% 1% 100%
2,815Scala 17.7817.7922,520404  0% 1% 0% 100%
2,915Scala #2 17.5717.5823,316720  0% 0% 0% 100%
3,007PHP #3 7 min7 min24,0521193  0% 0% 0% 100%
3,188Racket #3 20.5920.6125,504627  0% 0% 0% 100%
4,238Ruby 2.0 #3 6 min6 min33,904828  0% 0% 0% 100%
4,963Python 3 #5 13 min13 min39,704437  0% 0% 0% 100%
5,198Dart 22.3922.4141,580477  0% 1% 0% 100%
5,360Smalltalk VisualWorks #2 91.0391.0542,880438  0% 0% 0% 100%
5,789Clojure #7 18.3118.3246,308762  0% 0% 0% 100%
5,941Clojure #6 18.1318.1447,528808  0% 0% 0% 100%
76,733Ruby JRuby #2 252.52252.96613,860776  0% 0% 0% 100%
76,987Ruby JRuby #4 260.21260.67615,896326  0% 0% 0% 100%
77,062Ruby JRuby 283.31283.79616,496292  0% 0% 0% 100%
Scala #4 Failed1006
Scala #3 Failed982
"wrong" (different) algorithm / less comparable programs
94C++ g++ #2 7.857.857521330
94C++ g++ #7 8.428.427521283
29,626C gcc #2 3.783.79237,004669
60,868Python 3 #2 11.2411.26486,944233

 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