/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.7615.778423  0% 1% 0% 100%
47C gcc 20.7320.74372383  0% 0% 0% 100%
82C gcc #3 15.7015.70652463  0% 1% 1% 100%
82C gcc #4 10.6210.636521139  1% 0% 1% 100%
82C++ g++ #8 13.2613.266521278  1% 1% 1% 100%
82C gcc #5 7.847.85652569  0% 0% 1% 100%
98Fortran Intel #2 7.857.85780513  0% 1% 1% 100%
111C++ g++ 28.5128.52884452  1% 2% 1% 100%
117C++ g++ #6 7.927.939361044  0% 1% 1% 100%
117C++ g++ #5 7.927.939361044  0% 1% 1% 100%
118Lua 243.58243.64940329  0% 0% 0% 100%
121Go #2 20.7620.77968668  0% 1% 0% 100%
148Haskell GHC #4 15.7015.701,180984  1% 0% 1% 100%
152Go #3 20.7620.771,212536  0% 1% 1% 100%
155Ada 2005 GNAT 21.7621.761,236710  0% 0% 0% 100%
160Fortran Intel #3 7.857.861,276638  0% 0% 0% 100%
163Fortran Intel 7.867.871,300568  0% 1% 0% 100%
182Go 15.7715.781,456411  0% 1% 1% 100%
205Ada 2005 GNAT #3 15.7015.721,6401702  0% 1% 0% 100%
206Rust 30.9731.001,644835  1% 1% 1% 100%
208OCaml #2 18.8518.861,660377  0% 0% 0% 100%
238Ada 2005 GNAT #4 9.259.261,9042762  1% 0% 1% 100%
348Perl #2 15 min15 min2,784343  0% 0% 0% 100%
408OCaml #3 17.9718.923,264938  0% 0% 0% 100%
413Haskell GHC #2 35.1135.123,304403  0% 0% 0% 100%
455Perl 216.22216.313,640333  0% 0% 0% 100%
542Python 3 #8 17 min17 min4,332449  0% 0% 0% 100%
574Lisp SBCL #3 22.4122.424,592883  0% 0% 1% 100%
577Lisp SBCL #2 15.7115.724,616906  0% 1% 1% 100%
606PHP #2 7 min7 min4,848397  0% 0% 0% 100%
626Python 3 #6 15 min15 min5,004328  0% 1% 0% 100%
705Lisp SBCL 24.4124.425,636625  0% 0% 0% 100%
773C CINT 23 min23 min6,180394  0% 0% 0% 100%
828Ruby #4 9 min9 min6,624326  1% 1% 1% 100%
915Perl #3 16 min16 min7,320846  0% 0% 0% 100%
991Ruby 10 min10 min7,928292  0% 1% 1% 100%
1,043JavaScript V8 #2 15.7015.718,340328  0% 1% 1% 100%
1,052JavaScript V8 #3 15.7115.718,416373  1% 0% 0% 100%
1,055JavaScript V8 15.7115.728,436311  1% 0% 0% 100%
1,089Dart 23.0623.078,708457  0% 0% 1% 100%
1,271Erlang HiPE #2 45.1245.1310,164747  0% 0% 0% 100%
1,707Erlang HiPE 59.1459.1613,652507  0% 0% 0% 100%
1,816PHP #3 7 min7 min14,5241193  0% 0% 0% 100%
1,829C# Mono #2 29.4529.4614,6281063  0% 1% 1% 100%
1,896C# Mono 30.9630.9715,168459  0% 0% 0% 100%
2,052Java  #2 16.2616.2716,416950  1% 1% 0% 100%
2,111Racket 31.5631.5816,884446  1% 1% 0% 100%
2,148Java  16.5216.5317,180514  0% 0% 1% 100%
2,197F# Mono #2 29.7130.5617,576852  0% 1% 1% 97%
2,239Racket #2 28.2228.2317,912532  0% 0% 1% 100%
2,323Scala 16.0016.0118,580404  1% 0% 0% 100%
2,445Racket #3 23.0823.0919,560627  0% 0% 1% 100%
2,461Scala #2 16.2616.2719,688720  0% 1% 1% 100%
3,357Ruby #3 11 min11 min26,856828  0% 1% 1% 100%
3,405Smalltalk VisualWorks #2 95.3495.4027,236438  0% 0% 0% 100%
3,789Python 3 #5 17 min17 min30,308437  0% 1% 1% 100%
8,273Clojure #6 52.2252.2566,180808  1% 1% 0% 100%
8,314Clojure #7 52.7652.7966,508762  1% 0% 0% 100%
75,665Ruby JRuby #4 294.82295.25605,320326  0% 1% 1% 100%
78,323Ruby JRuby 6 min6 min626,584292  0% 1% 1% 100%
78,404Ruby JRuby #2 5 min5 min627,232776  0% 1% 1% 100%
Perl #4 Failed551
Scala #3 Failed982
Scala #4 Failed1006
"wrong" (different) algorithm / less comparable programs
117C++ g++ #7 7.987.989361283
117C++ g++ #2 16.4016.419361330
29,614C gcc #2 3.763.77236,912669
60,294Python 3 #2 12.1412.16482,352233
119,668Python 3 #3 101.22101.71957,344379

 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