Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Significant slow-down with Mathematica 7 (vs 6).

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95826] Significant slow-down with Mathematica 7 (vs 6).
  • From: Scott Morrison <scott.morrison at gmail.com>
  • Date: Wed, 28 Jan 2009 06:30:35 -0500 (EST)

I use RootReduce extremely heavily (subfactor/planar algebra
calculations). I've recently discovered that in many cases RootReduce
in Mathematica 7 runs significantly slower than in Mathematica 6. (Of course, I've
checked on the same machine.)

As an example, try RootReduce[x] with

x =
(Sqrt[(-1 + Sqrt[17])*(1 + Sqrt[17])]*
      Root[-2 - 3*#1^2 + #1^4 & , 2, 0]*
      Root[128 - 8055*#1^2 + 81*#1^4 & , 4, 0])/
    2 + (Sqrt[
       5 + Sqrt[17]]*(Sqrt[2*(5 - Sqrt[17])]*
         Root[-32 - 5*#1^2 + #1^4 & , 2, 0]*
         Root[32768 - 78588*#1^2 + 81*#1^4 & , 4, 0] -
        2*Sqrt[2*(5 - Sqrt[17])]*
         Root[-16384 - 36144*#1^2 + 81*#1^4 & , 1, 0] +
        Sqrt[2*(5 - Sqrt[17])]*Root[-2 - 3*#1^2 + #1^4 & , 2, 0]*
         Root[128 - 8055*#1^2 + 81*#1^4 & , 4, 0]))/
    2 + (Sqrt[
       5 + Sqrt[17]]*(4*Sqrt[2*(5 - Sqrt[17])]*
         Root[-32 - 5*#1^2 + #1^4 & , 2, 0]*
         Root[32768 - 78588*#1^2 + 81*#1^4 & , 4, 0] +
        4*Sqrt[2*(5 - Sqrt[17])]*Root[32 - 23*#1^2 + 4*#1^4 & , 1, 0]*
         Root[-8192 - 30645*#1^2 + 81*#1^4 & , 1, 0] +
        9*Sqrt[2*(5 - Sqrt[17])]*
         Root[-16384 - 13347*#1^2 + 81*#1^4 & , 2, 0] -
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-16384 - 13347*#1^2 + 81*#1^4 & , 2, 0] +
        4*Sqrt[2*(5 - Sqrt[17])]*Root[-8 + 11*#1^2 + #1^4 & , 1, 0]*
         Root[8192 - 6300*#1^2 + 81*#1^4 & , 1, 0] +
        Sqrt[2*(5 - Sqrt[17])]*
         Root[-1024 - 5499*#1^2 + 81*#1^4 & , 2, 0] -
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-1024 - 5499*#1^2 + 81*#1^4 & , 2, 0]))/
    8 + (Sqrt[
       5 + Sqrt[17]]*(38*Sqrt[2*(5 - Sqrt[17])]*
         Root[-4 + #1^2 + #1^4 & , 2, 0] +
        10*Sqrt[34*(5 - Sqrt[17])]*Root[-4 + #1^2 + #1^4 & , 2, 0] -
        12*Sqrt[2*(5 - Sqrt[17])]*
         Root[-16384 - 36144*#1^2 + 81*#1^4 & , 1, 0] +
        6*Sqrt[2*(5 - Sqrt[17])]*Root[-8 + 11*#1^2 + #1^4 & , 1, 0]*
         Root[8192 - 6300*#1^2 + 81*#1^4 & , 1, 0] -
        9*Sqrt[2*(5 - Sqrt[17])]*
         Root[-4096 - 2736*#1^2 + 81*#1^4 & , 2, 0] +
        3*Sqrt[34*(5 - Sqrt[17])]*
         Root[-4096 - 2736*#1^2 + 81*#1^4 & , 2, 0] +
        6*Sqrt[2*(5 - Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 2, 0]*
         Root[512 - 2556*#1^2 + 81*#1^4 & , 1, 0]))/
    12 + (Sqrt[
       5 + Sqrt[17]]*(Sqrt[2*(5 - Sqrt[17])]*
         Root[-16 - 251*#1^2 + 4*#1^4 & , 1, 0] +
        2*Sqrt[2*(5 - Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 1, 0]*
         Root[512 - 2556*#1^2 + 81*#1^4 & , 4, 0]))/
    4 + (Sqrt[
       5 + Sqrt[17]]*(2*Sqrt[2*(5 - Sqrt[17])]*
         Root[-1 + 3*#1^2 + 2*#1^4 & , 1, 0]*
         Root[512 - 2556*#1^2 + 81*#1^4 & , 4, 0] -
        3*Sqrt[2*(5 - Sqrt[17])]*
         Root[-256 - 684*#1^2 + 81*#1^4 & , 1, 0] +
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-256 - 684*#1^2 + 81*#1^4 & , 1, 0]))/
    4 + (Sqrt[(-1 + Sqrt[17])*(1 + Sqrt[17])]*
      Root[-1 + 3*#1^2 + 2*#1^4 & , 1, 0]*
      Root[32 - 639*#1^2 + 81*#1^4 & , 1, 0])/
    2 + (Sqrt[
       5 + Sqrt[17]]*(2*Sqrt[2*(5 - Sqrt[17])]*
         Root[-8 + 11*#1^2 + #1^4 & , 1, 0]*
         Root[8192 - 6300*#1^2 + 81*#1^4 & , 1, 0] -
        3*Sqrt[2*(5 - Sqrt[17])]*
         Root[-4096 - 2736*#1^2 + 81*#1^4 & , 2, 0] +
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-4096 - 2736*#1^2 + 81*#1^4 & , 2, 0] +
        2*Sqrt[2*(5 - Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 1, 0]*
         Root[32 - 639*#1^2 + 81*#1^4 & , 1, 0]))/
    4 + (Sqrt[(-1 + Sqrt[17])*(1 + Sqrt[17])]*
      Root[2 - 7*#1^2 + 4*#1^4 & , 1, 0]*
      Root[-128 - 12573*#1^2 + 324*#1^4 & , 1, 0])/
    2 + (Sqrt[
       5 + Sqrt[17]]*(19*Sqrt[2*(5 - Sqrt[17])]*
         Root[-4 + #1^2 + #1^4 & , 2, 0] +
        5*Sqrt[34*(5 - Sqrt[17])]*Root[-4 + #1^2 + #1^4 & , 2, 0] +
        3*Sqrt[2*(5 - Sqrt[17])]*Root[32 - 23*#1^2 + 4*#1^4 & , 1, 0]*
         Root[-8192 - 30645*#1^2 + 81*#1^4 & , 1, 0] +
        3*Sqrt[2*(5 - Sqrt[17])]*Root[2 - 7*#1^2 + 4*#1^4 & , 1, 0]*
         Root[-128 - 12573*#1^2 + 324*#1^4 & , 1, 0]))/
    6 + ((-1 + Sqrt[17])^(3/2)*Sqrt[1 + Sqrt[17]]*
      Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0])/
    8 + (Sqrt[
       5 + Sqrt[17]]*(9*Sqrt[2*(5 - Sqrt[17])]*
         Root[-16384 - 13347*#1^2 + 81*#1^4 & , 2, 0] -
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-16384 - 13347*#1^2 + 81*#1^4 & , 2, 0] +
        4*Sqrt[2*(5 - Sqrt[17])]*Root[-8 + 11*#1^2 + #1^4 & , 1, 0]*
         Root[8192 - 6300*#1^2 + 81*#1^4 & , 1, 0] -
        Sqrt[2*(5 - Sqrt[17])]*
         Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0] +
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0]))/
    8 + (Sqrt[
       5 + Sqrt[17]]*(4*Sqrt[2*(5 - Sqrt[17])]*
         Root[-2 - 3*#1^2 + #1^4 & , 2, 0]*
         Root[128 - 8055*#1^2 + 81*#1^4 & , 4, 0] +
        Sqrt[2*(5 - Sqrt[17])]*
         Root[-1024 - 5499*#1^2 + 81*#1^4 & , 2, 0] -
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-1024 - 5499*#1^2 + 81*#1^4 & , 2, 0] +
        4*Sqrt[2*(5 - Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 2, 0]*
         Root[512 - 2556*#1^2 + 81*#1^4 & , 1, 0] +
        4*Sqrt[2*(5 - Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 1, 0]*
         Root[32 - 639*#1^2 + 81*#1^4 & , 1, 0] +
        4*Sqrt[2*(5 - Sqrt[17])]*Root[2 - 7*#1^2 + 4*#1^4 & , 1, 0]*
         Root[-128 - 12573*#1^2 + 324*#1^4 & , 1, 0] -
        Sqrt[2*(5 - Sqrt[17])]*
         Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0] +
        Sqrt[34*(5 - Sqrt[17])]*
         Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0]))/
    8 + (Sqrt[(1 + Sqrt[17])/
        2]*(4*Sqrt[2*(-1 + Sqrt[17])]*
         Root[-2 - 3*#1^2 + #1^4 & , 2, 0]*
         Root[128 - 8055*#1^2 + 81*#1^4 & , 4, 0] +
        4*Sqrt[2*(-1 + Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 1, 0]*
         Root[32 - 639*#1^2 + 81*#1^4 & , 1, 0] +
        4*Sqrt[2*(-1 + Sqrt[17])]*Root[-1 + 3*#1^2 + 2*#1^4 & , 2, 0]*
         Root[32 - 639*#1^2 + 81*#1^4 & , 4, 0] +
        4*Sqrt[2*(-1 + Sqrt[17])]*Root[2 - 7*#1^2 + 4*#1^4 & , 1, 0]*
         Root[-128 - 12573*#1^2 + 324*#1^4 & , 1, 0] -
        Sqrt[2*(-1 + Sqrt[17])]*
         Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0] +
        Sqrt[34*(-1 + Sqrt[17])]*
         Root[-256 - 5499*#1^2 + 324*#1^4 & , 2, 0]))/8;

this runs in <2s in Mathematica 6 on my machine, and >30s in Mathematica7.
I have other examples where the difference is even worse.

Thanks,
Scott Morrison


  • Prev by Date: Using Map or Thread over selected parts of nested lists
  • Next by Date: Re: Compute ArcTan(n Pi+ Pi/2 + O(1))
  • Previous by thread: Re: Using Map or Thread over selected parts of nested lists
  • Next by thread: Re: Significant slow-down with Mathematica 7 (vs 6).