MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Switching to Mac caused 20x slowdown - please help!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60314] Re: Switching to Mac caused 20x slowdown - please help!
  • From: "flatuniverse" <flatuniverse at gmail.com>
  • Date: Sat, 10 Sep 2005 22:36:39 -0400 (EDT)
  • References: <200509090807.EAA16024@smc.vnet.net><dfuds3$1qm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The energy saver seems to have no effect.

Compiling the code as is seems to have no effect.  I tried playing
around with the code - the following version does a little better but
is still very slow - about 0.1 sec compared to 0.01 sec in Linux.

\!\(\*
  RowBox[{
    RowBox[{"cnewmag", "=",
      RowBox[{"Compile", "[",
        RowBox[{\({z, dq, dz, z1}\), ",", "\[IndentingNewLine]",
          RowBox[{\(z2 = z1 + dz\), ";",
        "\[IndentingNewLine]", \(Om =  .28\), ";
            ", \(h =  .717137\), ";", "\[IndentingNewLine]",
            RowBox[{"5",
              RowBox[{"Log", "[",
                RowBox[{"10", ",", "\[IndentingNewLine]",
                  RowBox[{\(\((1 + z)\)\/\(10  h*H0\)\), " ",
                    RowBox[{"NIntegrate", "[", "\[IndentingNewLine]",
                      RowBox[{
                        SuperscriptBox[
                          RowBox[{"(",
                            RowBox[{\((Om*\((1 + x)\)\^3 + \((1 -
Om)\))\), "*
                ",
                              RowBox[{"\[Piecewise]", GridBox[{
                                    {"1", \(x = z1\)},
                                    {\(\((\(1 + x\)\/\(1 + z1\))\)\^\(2

                    dq\)\), \(z1 < x < z2\)},
                                    {\(\((\(1 + z2\)\/\(1 +
                      z1\))\)\^\(2  dq\)\), \(x = z2\)}
                                    }]}]}], ")"}], \(\(-1\)/2\)], ",",
\({x,
                                    0, z}\)}], "]"}]}]}], "]"}]}]}]}],
                          "\[IndentingNewLine]", "]"}]}], ";"}]\)


  • Prev by Date: Re: Matrix question
  • Next by Date: Re: Timed Notebooks for Student Take-home examinations
  • Previous by thread: Re: Switching to Mac caused 20x slowdown - please help!
  • Next by thread: Re: Switching to Mac caused 20x slowdown - please help!