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.728423  1% 1% 0% 100%
59C gcc 20.6920.70468383  1% 1% 0% 100%
94C++ g++ #5 10.0510.057481044  1% 1% 1% 100%
94C++ g++ #8 10.6310.647521278  1% 0% 1% 100%
94C gcc #5 7.857.85752569  1% 1% 1% 100%
94C++ g++ #6 10.0510.057521044  1% 0% 1% 100%
94C gcc #4 10.6110.617521139  1% 0% 0% 100%
94C gcc #3 15.7115.71752463  1% 1% 0% 100%
97Fortran Intel #2 7.857.85776513  1% 0% 1% 100%
128Go #3 15.7015.711,024536  0% 1% 1% 100%
128Go #2 15.7015.701,024668  0% 0% 1% 100%
134C++ g++ 20.7520.761,072452  1% 1% 0% 100%
161Go 15.7015.701,288411  1% 0% 1% 100%
166Lua 190.00190.051,324329  1% 0% 0% 100%
168Fortran Intel #3 7.857.851,344638  1% 1% 1% 100%
178Fortran Intel 7.857.851,420568  0% 1% 0% 100%
187Ada 2005 GNAT 21.7621.771,492710  1% 0% 1% 100%
196Haskell GHC #4 15.6915.701,564984  0% 1% 0% 100%
241Ada 2005 GNAT #4 7.877.881,9282762  0% 1% 1% 100%
241Ada 2005 GNAT #3 16.5016.521,9281702  1% 2% 1% 100%
377OCaml #2 15.6915.693,012377  1% 1% 0% 100%
452OCaml #3 15.8715.883,612938  1% 1% 0% 100%
489Perl #2 16 min16 min3,912343  1% 0% 0% 100%
506Haskell GHC #2 22.7622.774,048403  0% 0% 1% 100%
669Perl 185.03185.095,352333  1% 0% 0% 100%
810Python 3 #6 13 min13 min6,480328  1% 0% 0% 100%
911PHP #2 7 min7 min7,284397  1% 0% 0% 100%
954Ruby 6 min6 min7,632292  1% 0% 0% 100%
1,123JavaScript V8 #2 15.7015.718,984328  0% 0% 1% 100%
1,131JavaScript V8 #3 15.7015.719,044373  0% 1% 0% 100%
1,131JavaScript V8 #5 15.7015.719,048385  0% 0% 1% 100%
1,139Ruby #4 5 min5 min9,108326  1% 0% 1% 100%
1,143JavaScript V8 15.7115.719,144311  1% 1% 2% 100%
1,160Lisp SBCL 20.9220.939,280625  1% 1% 0% 100%
1,273Perl #3 14 min14 min10,184846  0% 1% 1% 100%
2,310Erlang HiPE #2 68.4768.5018,480747  1% 0% 0% 100%
2,428Lisp SBCL #3 15.8815.8919,420883  2% 1% 1% 100%
2,428Lisp SBCL #2 15.8815.8919,424906  0% 0% 1% 100%
2,453Erlang HiPE 112.65112.6919,624507  1% 1% 0% 100%
2,520C# Mono 21.8621.8620,156459  1% 0% 0% 100%
2,622Racket 39.8239.8420,976446  1% 0% 1% 100%
2,789C# Mono #2 21.8821.8922,3121063  0% 1% 1% 100%
2,952PHP #3 8 min8 min23,6161193  0% 1% 1% 100%
3,046Dart 15.9515.9524,364457  1% 0% 1% 100%
3,194Java  17.0917.1025,552514  1% 0% 0% 100%
3,196Java  #2 17.4117.4125,568950  0% 1% 1% 100%
3,230Dart #5 16.6516.6625,836486  0% 0% 1% 100%
3,473Scala 16.7616.7627,780404  1% 0% 0% 100%
3,516Racket #2 37.8237.8328,128532  1% 0% 1% 100%
3,621F# Mono #3 17.7818.8128,968720  0% 1% 0% 95%
3,752F# Mono #2 22.2123.1930,012852  0% 1% 0% 96%
4,148Racket #3 20.5220.5333,180627  0% 1% 0% 100%
5,026Ruby #3 6 min6 min40,204828  0% 1% 1% 100%
5,724Python 3 #5 14 min14 min45,792437  1% 1% 0% 100%
6,568Smalltalk VisualWorks #2 91.0191.0552,544438  1% 1% 0% 100%
7,656Clojure #7 18.5018.5261,248762  1% 0% 1% 100%
7,717Clojure #6 18.3118.3261,732808  1% 1% 0% 100%
7,733Clojure #8 17.9417.9561,864918  0% 1% 1% 100%
9,544Hack #2 55.4255.4476,352398  1% 0% 0% 100%
17,745Hack #3 57.5357.55141,9601195  1% 1% 1% 100%
84,697Ruby JRuby #4 249.37249.79677,572326  0% 1% 1% 100%
85,061Ruby JRuby 266.87267.33680,488292  0% 1% 1% 100%
85,138Ruby JRuby #2 279.66280.12681,104776  0% 1% 0% 100%
Perl #4 Failed551
Rust Make Error898
Scala #4 Failed1006
Scala #3 Failed982
Scala #2 Failed720
"wrong" (different) algorithm / less comparable programs
94C++ g++ #7 8.428.437521283
94C++ g++ #2 7.857.867521330
29,614C gcc #2 2.332.33236,908669
60,570Python 3 #2 7.507.51484,560233
149,737Python 3 #3 75.2675.411,197,896379

 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