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.7615.768423  0% 0% 0% 100%
98Fortran Intel #2 7.867.87784513  1% 0% 0% 100%
99C gcc 16.3516.36792383  1% 1% 4% 100%
129Go #2 15.7015.711,028668  0% 0% 1% 100%
129Go 20.8020.811,028411  0% 1% 1% 100%
138Lua 5 min5 min1,100329  1% 0% 1% 100%
144Haskell GHC #4 16.0516.061,152984  1% 1% 0% 100%
156C++ g++ 29.1829.191,248452  1% 0% 0% 100%
161Go #3 15.7015.711,284536  0% 1% 1% 100%
162Fortran Intel #3 7.857.861,296638  0% 1% 1% 100%
169Fortran Intel 7.867.871,348568  1% 0% 0% 100%
191C gcc #5 7.857.851,528569  1% 0% 0% 100%
205Ada 2005 GNAT 15.9415.951,640710  0% 1% 1% 100%
207OCaml #2 18.8518.861,656377  0% 0% 0% 100%
210C gcc #3 16.0116.021,676463  1% 1% 0% 100%
216C gcc #4 7.857.851,7281139  1% 0% 1% 100%
218C++ g++ #8 13.1613.171,7441278  1% 0% 1% 100%
268C++ g++ #5 7.927.932,1441044  1% 1% 1% 100%
269C++ g++ #6 7.927.932,1481044  2% 0% 0% 100%
382Perl #2 15 min15 min3,056343  0% 1% 1% 100%
409Haskell GHC #2 34.9034.913,272403  1% 1% 0% 100%
413OCaml #3 17.9718.923,304938  0% 1% 1% 100%
465Perl 206.26206.333,720333  1% 1% 1% 100%
492Ada 2005 GNAT #3 16.1016.123,9361702  1% 0% 1% 100%
495Ada 2005 GNAT #4 9.199.213,9562762  1% 0% 1% 100%
584PHP #2 8 min8 min4,672397  0% 0% 1% 100%
622Python 3 #6 15 min15 min4,972328  0% 0% 1% 100%
662Perl #5 183.01183.065,292340  1% 0% 1% 100%
708Ruby 10 min10 min5,664292  0% 1% 0% 100%
725Ruby #4 9 min9 min5,800326  0% 1% 1% 100%
773C CINT 23 min23 min6,180394  0% 0% 0% 100%
944Perl #3 14 min14 min7,548846  1% 1% 1% 100%
1,030JavaScript V8 #2 15.7015.718,240328  0% 1% 1% 100%
1,037JavaScript V8 #3 15.7015.718,292373  0% 1% 1% 100%
1,042JavaScript V8 #5 15.7115.718,332385  1% 0% 0% 100%
1,047JavaScript V8 15.7115.718,372311  0% 1% 1% 100%
1,272Lisp SBCL 23.3923.4010,176625  0% 0% 0% 100%
1,781Erlang HiPE #2 70.1270.1414,244747  1% 0% 0% 100%
1,805PHP #3 7 min7 min14,4361193  1% 1% 0% 100%
2,031Erlang HiPE 114.62114.6616,248507  1% 0% 0% 100%
2,224Lisp SBCL #3 23.8523.8617,792883  0% 1% 1% 100%
2,417Racket #2 28.3228.3319,336532  0% 1% 0% 100%
2,471Dart 16.1516.1619,768489  1% 1% 0% 100%
2,509Lisp SBCL #2 15.8815.8920,068906  0% 1% 1% 100%
2,654Racket 31.4131.4221,228446  0% 1% 1% 100%
2,725Racket #3 22.9022.9121,800627  0% 1% 0% 100%
2,858Dart #5 16.0316.0422,860518  0% 1% 0% 100%
3,357Java  17.3217.3326,856514  0% 1% 1% 100%
3,360Java  #2 16.3616.3726,876950  1% 1% 0% 100%
3,532Scala 16.0016.0128,252404  0% 1% 1% 100%
3,788Python 3 #5 16 min16 min30,304437  1% 1% 0% 100%
3,873Smalltalk VisualWorks #2 108.94108.9830,980438  1% 1% 1% 100%
4,060Scala #5 16.4416.4532,480693  0% 0% 1% 100%
4,801C# Mono #2 31.6631.6738,4081063  1% 0% 0% 100%
4,892C# Mono 29.5329.5539,132459  0% 1% 0% 100%
4,960Ruby #3 11 min11 min39,680828  0% 1% 1% 100%
5,355F# Mono #2 31.6532.3842,840852  1% 0% 0% 98%
5,431F# Mono #3 18.1819.1143,444720  1% 2% 1% 95%
6,700Clojure #7 44.5744.5953,596762  1% 0% 0% 100%
6,997Clojure #6 41.5741.5955,972808  1% 0% 0% 100%
7,024Clojure #8 41.8241.8456,188918  0% 1% 1% 100%
78,161Ruby JRuby #2 5 min5 min625,284776  1% 1% 1% 100%
78,217Ruby JRuby 5 min5 min625,732292  0% 1% 1% 100%
80,547Ruby JRuby #4 273.47273.84644,376326  0% 1% 1% 100%
Perl #4 Failed551
Rust Make Error898
Scala #2 Failed720
Scala #3 Failed982
Scala #4 Failed1006
"wrong" (different) algorithm / less comparable programs
189C++ g++ #2 17.2517.261,5081330
253C++ g++ #7 8.488.492,0241283
29,718C gcc #2 2.312.32237,740669
60,172Python 3 #2 8.528.53481,376233
119,675Python 3 #3 74.7874.87957,396379

 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