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% 0% 100% 0%
59C gcc 20.6920.70468383  1% 0% 1% 100%
62C gcc #4 10.652.684961139  100% 100% 100% 100%
62C++ g++ #8 10.682.684961278  100% 100% 100% 100%
62C++ g++ #5 10.092.544961044  100% 100% 100% 100%
62C++ g++ #6 10.092.544961044  99% 99% 100% 100%
94C gcc #3 15.753.95752463  100% 100% 100% 100%
94C gcc #5 7.891.98752569  99% 99% 100% 100%
97Fortran Intel #2 7.857.85776513  0% 1% 100% 0%
128Go #3 15.723.961,024536  99% 99% 99% 99%
128Go #2 15.784.151,024668  95% 96% 94% 96%
134C++ g++ 20.7520.761,072452  1% 0% 100% 1%
161Go 15.7015.691,288411  0% 1% 100% 1%
187Ada 2005 GNAT 21.7621.771,492710  1% 1% 100% 0%
241Ada 2005 GNAT #3 16.914.341,9241702  99% 99% 99% 94%
241Ada 2005 GNAT #4 7.882.011,9282762  99% 99% 99% 99%
410OCaml #2 15.6915.693,276377  1% 1% 100% 0%
424Fortran Intel #3 7.901.983,392638  99% 100% 99% 100%
437OCaml #3 16.024.313,496938  93% 94% 93% 92%
465Fortran Intel 7.911.993,716568  99% 100% 100% 99%
512Perl #2 16 min16 min4,096343  32% 37% 0% 32%
692Perl 213.16213.225,536333  0% 1% 1% 100%
724Haskell GHC #4 15.704.055,788984  95% 97% 99% 97%
810Python 3 #6 13 min13 min6,480328  1% 100% 0% 0%
907PHP #2 7 min7 min7,252397  1% 0% 100% 1%
960Ruby 6 min6 min7,676292  94% 0% 7% 1%
1,099Haskell GHC #2 44.1220.778,788403  36% 39% 39% 100%
1,125Ruby #4 5 min5 min9,000326  0% 1% 100% 0%
1,160Lisp SBCL 20.9220.939,280625  1% 0% 100% 0%
1,193Perl #4 190.7749.439,540551  96% 96% 99% 96%
1,312Perl #3 16 min255.1510,492846  100% 100% 100% 100%
2,512C# Mono 21.8621.8720,092459  0% 1% 0% 100%
2,572Erlang #2 152.1838.5620,576747  98% 98% 99% 100%
2,622Lisp SBCL #2 15.974.1820,972906  96% 95% 96% 96%
2,625Racket 39.8239.8221,000446  1% 0% 0% 100%
2,632Lisp SBCL #3 15.984.1921,052883  96% 96% 95% 96%
2,940PHP #3 8 min126.5623,5161193  99% 99% 99% 99%
3,060Dart 15.9515.8324,480457  1% 1% 1% 100%
3,096C# Mono #2 21.955.6424,7641063  98% 98% 97% 97%
3,188Java  17.1117.0625,500514  1% 1% 100% 1%
3,190Dart #5 16.3716.2525,516486  100% 1% 1% 1%
3,212Java  #2 17.604.5525,696950  96% 96% 97% 98%
3,244Erlang 213.78213.9225,948507  1% 17% 0% 83%
3,330Erlang HiPE #2 70.4418.0326,640747  97% 98% 98% 98%
3,731F# Mono #3 17.916.2729,848720  71% 68% 73% 75%
3,759Racket #2 37.8237.8230,068532  1% 0% 0% 100%
3,823F# Mono #2 22.317.3730,580852  73% 76% 75% 80%
4,104Racket #3 20.605.3932,832627  95% 95% 98% 95%
4,201Erlang HiPE 118.68118.7233,604507  100% 0% 1% 1%
4,362Scala 16.8016.7234,896404  1% 0% 1% 100%
5,030Ruby #3 6 min102.0140,236828  96% 97% 96% 96%
5,473Python 3 #5 13 min211.8543,784437  99% 99% 99% 99%
8,162Clojure #8 18.375.2865,296918  84% 98% 83% 84%
8,284Clojure #6 18.815.5866,268808  83% 80% 80% 95%
8,334Clojure #7 18.945.5966,668762  84% 89% 83% 85%
9,544Hack #2 55.4255.4476,352398  1% 1% 100% 0%
17,748Hack #3 57.6614.76141,9801195  98% 98% 98% 98%
84,205Ruby JRuby #4 250.63243.93673,640326  21% 24% 31% 28%
84,247Ruby JRuby 270.52263.40673,976292  27% 27% 20% 31%
84,446Ruby JRuby #2 16 min253.95675,568776  98% 98% 98% 98%
Rust Make Error898
Scala #4 Failed1006
Scala #3 Failed982
Scala #2 Failed720
"wrong" (different) algorithm / less comparable programs
62C++ g++ #7 8.492.144921283
62C++ g++ #2 7.921.994961330
29,613C gcc #2 2.332.34236,904669
61,170Python 3 #2 7.537.54489,356233
149,749Python 3 #3 75.1075.261,197,992379

 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