Dr. David Kirkby wrote:
> Has anyone ever thought of developing a Sage benchmark, so allowing 
> different hardware to be compared in running Sage? If people are setting 
> up a Sage server, it would be sensible they have some idea of the 
> performance of various hardware.
> 
> Mathematica has one built in, which tests 15 things.
> 
> Data Fitting
> Digits of Pi
> Discrete Fourier Transform
> Eignenvalues of a matrix
> Elementary functions
> Gamma function
> Large integer multiplication
> Matrix Arithmetic
> Matrix Transpose
> Numerical Integration
> Polynomial expansion.
> Random number sort
> Singular Value Decomposition
> Solving a linear system.
> 
> Data is referenced to a 2.4 GHz Pentium 4 running XP.
> 
> Obviously the code for that is propriety.
> 
> But there are Mathematica benchmarks around, the most popular of which 
> seems to be
> 
> http://www2.staff.fh-vorarlberg.ac.at/~ku/karl/mma.html
> 
> The license for the latter is not stated, so I just emailed the author 
> to ask if he would release it under the GPL.
> 
> 
> Dave

I got a reply from Karl Unterkofler who has developed that Mathematica 
benchmark which appears to be quite widely used.

http://www2.staff.fh-vorarlberg.ac.at/~ku/karl/mma.html

He has no problem if we wanted to adapt his benchmark for Sage, though 
he would appreciate a reference to the original source.

You can see what his latest version does here:
http://www2.staff.fh-vorarlberg.ac.at/~ku/karl/timings70.html


    1.  Timing[N[Pi, 5000000]]][[1]]
    2. Timing[N[Sin[1/2], 3000000]][[1]]
    3. Timing[10000000!][[1]]
    4. Timing[FactorInteger[2^256 - 1]][[1]]
    5. Timing[PrimeQ[2^19937 - 1]][[1]]
    6. Timing[Eigenvalues[Table[Random[], {1200}, {1200}]]][[1]]
    7. Sum[N[WeierstrassP[n, {1, 1}]], {n, 40000}]][[1]]
    8. Timing[Table[Together[c[k]], {k, 4, 24}]][[1]]
    9. Timing[Integrate[1/(1 + x^1005), x]][[1]]
   10. Timing[Table[N[WeierstrassP[n, {1, 1}]], {n, 40000}]][[1]]
   11. Sum[2 / Pi Integrate[Log[2 Cos[x/2]] * Cos[n x], {x, 0, \[Pi]}], 
{n, 0, 15}]][[1]]
   12. Timing[Sum[HermiteH[n, z], {n, 1500}]][[1]]
   13. Timing[Expand[(a1 + a2 + a3 + a4 + a5 + a6 + a7)^29]][[1]]
   14. Timing[LinearSolve[RandomReal[{0, 1}, {6000, 6000}], 
RandomReal[{0, 1}, 6000]]][[1]]
   15. Timing[Eliminate[{a0*b0 == g0, a1*b0 + a0*b1 == g1,
       a2*b0 + 2*a1*b1 + a0*b2 == g2,
       3*a2*b1 + 3*a1*b2 - q1*g1 - g0*q11 == g3,
       -3*z*(a1*b0 - a0*b1) - q1*g2 - 7/2*q11*g1 - g0*q12 + 6*a2*b2 - 
6*a1*b1*q1 == g4,
       g2 - 3*a1*b1 + q1*g0 == -1}, {a0, a1, a2, b0, b1, b2}]][[1]]

where
c[2]   := c2; c[3] := c3;
c[k_]  := 3/((2*k + 1)*(k - 3))*Sum[c[m]*c[k - m], {m, 2, k - 2}];


His actual code is below. The 'ref' refers to times on his reference 
machine. So all scores are relative to that, which has a value of 1.0 of 
course.

Block[{},
  ref = {11.49, 10.48, 15.12, 3.50, 18.48, 11.38, 4.82, 35.32, 7.36,
    11.74, 34.48, 14.24, 16.29, 25.3, 35.93};
  c[2] := c2; c[3] := c3;
  c[k_] := 3/((2 k + 1) (k - 3)) Sum[c[m] c[k - m], {m, 2, k - 2}];
        start = AbsoluteTime[];
        time = {Timing[N[\[Pi], 5000000]][[1]],
                        Timing[N[Sin[1/2], 3000000]][[1]],
                        Timing[10000000!][[1]],
                        Timing[FactorInteger[2^256 - 1]][[1]],
                        Timing[PrimeQ[2^19937 - 1]][[1]],
                        Timing[Eigenvalues[Table[Random[], {1200}, 
{1200}]]][[1]],
                        Timing[Nest[BesselJ[0, #] &, 2, 11000]][[1]],
                         Timing[Sum[Together[c[k]], {k, 4, 24}]][[1]],
                        Timing[Integrate[1/(1 + x^1005), x]][[1]],
                        Timing[Sum[N[WeierstrassP[n, {1, 1}]], {n, 
40000}]][[1]],
                 Timing[
      Sum[2/\[Pi]  Integrate[
         Log[2 Cos[x/2]] * Cos[n x], {x, 0, \[Pi]}], {n, 0, 15}]][[
     1]],
                 Timing[Sum[HermiteH[n, z], {n, 1500}]][[1]],
                 Timing[Expand[(a1 + a2 + a3 + a4 + a5 + a6 + a7)^29]][[1]],
                 AbsoluteTiming[
      LinearSolve[RandomReal[{0, 1}, {6000, 6000}],
       RandomReal[{0, 1}, 6000]]][[1]],
                Timing[Eliminate[{a0 b0 == g0, a1 b0 + a0 b1 == g1,
        a2 b0 + 2 a1 b1 + a0 b2 == g2,
        3 a2 b1 + 3 a1 b2 - q1 g1 - g0 q11 ==
         g3, -3 z (a1 b0 - a0 b1) - q1 g2 - 7/2 q11 g1 - g0 q12 +
          6 a2 b2 - 6 a1 b1 q1 == g4, g2 - 3 a1 b1 + q1 g0 == -1}, {a0,
         a1, a2, b0, b1, b2}]][[1]]  };
        clocktime = N[AbsoluteTime[] - start, 4];
        reltime = time/ref;
        timeN3 = N[time, 3];
        
        totalkernel = N[ Apply[Plus, time], 4];
        benchmark = N[15/\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 1\), \(15\)]\(reltime[[j]]\)\),
     3]; Print["Version   = ", $Version]; Print["Times     = ", timeN3];
        Print["Total Kernel Time = ", totalkernel,
                ",  Total Time = ", clocktime];
  Print["Benchmark7 = ", benchmark];]


For an earlier version, he has got many results from other people. For 
version 7 he does not have that many. He also has a parallel version of 
the benchmark.

Could Sage do all of those things? If so, it could make for an 
interesting comparison between Sage and MMA.

Dave





--- Reply received from Karl about MMA benchmark -----

Dear Dave,

the aim of my MMA benchmark is to give Mathematica users a decision 
support which platform is most suitable for their needs, e.g., should 
one use Vista or XP?, can one use Linux or Mac OS X?, which processor 
should one use 32- or 64-bit?, etc.

Some time ago (1994) I also made a corresponding Maple benchmark 
(google: "Comparison of Mathematica on Various Computers") but there 
wasn't enough input from other users to keep this ongoing.

I had to update the benchmark for new versions of MMA for several 
reasons, speed improvements, syntax changes, bugs, parallelization, 
etc., though I tried to keep as much as possible from the old code.

I have no problem if you adopt my benchmark for use with Sage.
However a  reference to the original source would be nice.

Karl

--------------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to