Name: Rolf Mertig Date: 06/21/12-12:20:45 AM Z


Am 20.06.2012 17:21, schrieb Feng Feng:
> Dear All,
>
> I have found that The Tr operation is terriblely slow in FeynCalc 6.0, while the same code run very faster with fc5beta3.
>
> Here is my testing code, and has anyone else experienced the same problem?
>
> ===========================
> «HighEnergyPhysics`fc`
>
> exp = (mc + GSD[k1]).GAD[c[li3]].(mc + GSD[k1 + k2 + p - q]).GAD[
*> c[\\\\\\\\\\\\\\\\[Gamma]]].(-mc

Rolf

Mathematica 8.0 for Linux x86 (64-bit)
Copyright 1988-2011 Wolfram Research, Inc.

In[1]:= !!t
<<HighEnergyPhysics`fc` ;
s2v[a_Symbol,b_Symbol]:=s2v[a]=Symbol[ToString[a]<>ToString[b]];
exp = (mc + GSD[k1]).GAD[li3].(mc + GSD[k1 + k2 + p

Print[“time needed for the trace = “,
AbsoluteTiming[trres=Tr[exp];]//First];

Print[“the result is : “,
InputForm[result = Collect2[FCE[trres]/.SPD->s2v, mc, Factoring ->
Simplify, IsolateNames -> X]]];
Print[“where : “];
??X

In[1]:= <<t
Loading FeynCalc from /usr/share/Mathematica/Applications/HighEnergyPhysics
FeynCalc 8.1.0 Type ?FeynCalc for help or visit http://www.feyncalc.org/
$PrePrint is set to FeynCalcForm. Use FI and FC to change the display
format.
Loading FeynArts, see www.feynarts.de for documentation
FeynArts 3.4 patched for use with FeynCalc
time needed for the trace = 31.681195
the result is : -4*D^3*mc^8 + 4*mc^2*HoldForm[X[17]]

   4*mc^4*HoldForm[X[28]] + 4*mc^6*HoldForm[X[32]] -

   4*HoldForm[X[3]]^3*HoldForm[X[47]]
where :
Global`X

X[3] = -2 + D

X[4] = -6*pp + 5*D*pp + 4*D*pq - 6*qq + D*qq + 4*k2p*HoldForm[X[3]] +
     2*k2q*HoldForm[X[3]]

X[5] = 8 - 10*D + D^2

X[6] = 16*pq - 20*D*pq + 2*D^2*pq - 8*qq + 2*D*qq - D^2*qq +
     k2q*HoldForm[X[3]]^2 - pp*HoldForm[X[5]]

X[7] = 32*k2q^2 - 48*D*k2q^2 + 24*D^2*k2q^2 - 4*D^3*k2q^2

X[8] = -2 + 5*D

X[9] = 2*k2p*HoldForm[X[3]] + qq*HoldForm[X[3]] + pp*HoldForm[X[8]]

X[10] = 5*pp - 4*pq + qq

X[11] = -4*pq + k2q*HoldForm[X[3]] - D*HoldForm[X[10]]

X[12] = pp - 2*pq + qq

X[13] = -16 + 9*D

X[14] = 2*pq + qq

X[15] = pp*HoldForm[X[13]] + D*HoldForm[X[14]]

X[16] = 4*k2p^2*HoldForm[X[3]]^2 + 2*k2k2*HoldForm[X[3]]*HoldForm[X[9]]

X[17] = 64*k1k1*k2p^2 - 96*D*k1k1*k2p^2 + 48*D^2*k1k1*k2p^2 -
     8*D^3*k1k1*k2p^2 + 128*k1k2*k2p^2 - 192*D*k1k2*k2p^2 +
     96*D^2*k1k2*k2p^2 - 16*D^3*k1k2*k2p^2 - 16*k1k1*k2k2*pp

X[18] = 2*k2p + 2*pp - pq + qq

X[19] = 6*k2p + 10*pp - pq + qq

X[20] = pq + qq

X[21] = 4*k2p + 5*pp + pq + 2*qq

X[22] = D^3*HoldForm[X[18]] - 2*D^2*HoldForm[X[19]] - 8*HoldForm[X[20]] +
     4*D*HoldForm[X[21]]

X[23] = k2k2*HoldForm[X[3]]^3 + 2*HoldForm[X[22]]

X[24] = -8 + D

X[25] = D*qq + pp*HoldForm[X[24]]

X[26] = k2p*HoldForm[X[3]]^2 + D*HoldForm[X[25]]

X[27] = k2k2*HoldForm[X[3]]^2 + 2*HoldForm[X[26]]

X[28] = -24*k1p*k2k2 + 20*D*k1p*k2k2 - 2*D^2*k1p*k2k2 - D^3*k1p*k2k2 +
     8*k1q*k2k2 - 12*D*k1q*k2k2 + 6*D^2*k1q*k2k2 - D^3*k1q*k2k2 +
32*k1p*k2p -
     8*D^2*k1p*k2p - 16*k1q*k2p + 8*D*k1q*k2p + 4*D^2*k1q*k2p

X[29] = 2*k1k2 + 4*k1p + k2p + k2q

X[30] = k1k1 + k1k2 + 3*k1p - k1q - 2*k2p + 2*k2q + 4*pp + 4*pq

X[31] = k1k1 + k1k2 + k1p - k1q + k2k2 + 2*pq + 2*qq

X[32] = -8*k1k2 + 4*D*HoldForm[X[29]] - 2*D^2*HoldForm[X[30]] +
     D^3*HoldForm[X[31]]

X[33] = pp - 2*pq - qq

X[34] = 8*k2q*pp - pp^2 + 4*pq^2 - 2*pp*qq - qq^2 + 4*k2p*HoldForm[X[33]]

X[35] = 3*pp - 6*pq - qq

X[36] = 5*pp - 2*pq + qq

X[37] = 3*pp^2 - 8*pp*pq + 4*pq^2 + 2*pp*qq - qq^2 + 2*k2q*HoldForm[X[36]]

X[38] = 4*k2q*pp*HoldForm[X[12]] + 2*k2p^2*HoldForm[X[35]] +
     k2p*HoldForm[X[37]]

X[39] = k2k2*HoldForm[X[34]] + 2*HoldForm[X[38]]

X[40] = pp + 2*pq - qq

X[41] = 3*pp^2 - 12*pq^2 + 8*k2p*qq + 6*pp*qq + 3*qq^2

4*k2q*HoldForm[X[40]]

X[42] = -3*pp^2 + 8*pp*pq - 4*pq^2 - 2*pp*qq + qq^2 + 2*k2q*HoldForm[X[36]]

X[43] = -3*pp + 6*pq + qq

X[44] = pp^2 - 4*pp*pq + 4*pq^2 - qq^2 + k2q*HoldForm[X[43]]

X[45] = k2q*HoldForm[X[42]] - 2*k2p*HoldForm[X[44]]

X[46] = k2k2*HoldForm[X[41]] - 2*HoldForm[X[45]]

X[47] = -8*k1k1*k2q^2*pp - 16*k1k2*k2q^2*pp + k1k1*k2k2*pp^2 +
     k1k2*k2k2*pp^2 + 2*k1k1*k2p*pp^2 + 8*k1k1*k2q*pp^2 + 12*k1k2*k2q*pp^2 -
     2*k1k2*pp^3 + 16*k1k1*k2p*k2q*pq + 32*k1k2*k2p*k2q*pq -
     8*k1k1*k2p*pp*pq - 12*k1k2*k2p*pp*pq - 4*k1k2*k2q*pp*pq