Quit[]

<<FeynCalc`

SP[k1,k2] Pair[LorentzIndex[mu],Momentum[Polarization[p,I]]] FV[k1,mu] FV[k2,nu] Pair[LorentzIndex[nu],Momentum[Polarization[p,-I]]]//DoPolarizationSums[#,p]&

FCClearScalarProducts[];ScalarProduct[p,p]=M; MatchQ[SP[k1,k2] Pair[LorentzIndex[mu],Momentum[Polarization[p,I]]] FV[k1,mu] FV[k2,nu] Pair[LorentzIndex[nu],Momentum[Polarization[p,-I]]]//DoPolarizationSums[#,p]&,Pair[Momentum[k1],Momentum[k2]] (-Pair[Momentum[k1],Momentum[k2]]+(Pair[Momentum[k1],Momentum[p]] Pair[Momentum[k2],Momentum[p]])/Pair[Momentum[p],Momentum[p]])]

Tr[DiracMatrix[sigma].(DiracSlash[k1] - DiracSlash[p1] -
	m).DiracMatrix[rho].(DiracSlash[p1] + m).(DiracSlash[p2] - m),
	PairCollect -> True]

aa=2*OPEm*FAD[q,-p+q,-p+q]*SOD[p]*SOD[q]^(-1+OPEm)-2*D*FAD[q,q,-p+q]*SOD[q]^OPEm-4*OPEm*FAD[q,q,-p+q]*SOD[q]^OPEm-2*D*FAD[q,-p+q,-p+q]*SOD[q]^OPEm-2*OPEm*FAD[q,-p+q,-p+q]*SOD[q]^OPEm-2*OPEm*FAD[q,-p+q,-p+q]*SOD[q]^(-1+OPEm)*(-SOD[p]+SOD[q])-4*FAD[q,q,-p+q,-p+q]*SOD[q]^OPEm*SPD[p,q]-8*FAD[q,-p+q,-p+q,-p+q]*SOD[q]^OPEm*(-SPD[p,p]+SPD[p,q])+8*FAD[q,q,q,-p+q]*SOD[q]^OPEm*SPD[q,q]+4*FAD[q,q,-p+q,-p+q]*SOD[q]^OPEm*SPD[q,q]+4*FAD[q,q,-p+q,-p+q]*SOD[q]^OPEm*(-SPD[p,q]+SPD[q,q])+8*FAD[q,-p+q,-p+q,-p+q]*SOD[q]^OPEm*(-SPD[p,q]+SPD[q,q])

bb=-2*D*FAD[q,q,-p+q]*SOD[q]^OP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D[p,q]-FVD[p,ν3] MTD[μ3,ν] SPD[q,q]+FVD[q,ν3] MTD[μ3,ν] SPD[q,q]+FVD[q,μ3] MTD[ν,ν3] SPD[q,q]+MTD[μ3,ν3] (FVD[p,ν] (SPD[p,p]-2 SPD[p,q]+SPD[q,q])-FVD[q,ν] (SPD[p,p]-2 SPD[p,q]+2 SPD[q,q])))

(res=Contract[inp,FCVerbose->0])//AbsoluteTiming

FCSplit[FCI[inp],{LorentzIndex,Eps},Expanding->False]//AbsoluteTiming

PartitHead[FCI[inp],LorentzIndex]

AbsoluteTiming[Times@@(NTerms/@(List@@FCI[inp]))]

Expand2[FCI[inp],LorentzIndex]//Length

AbsoluteTiming[Expand2[FCI[inp],LorentzIndex];]

inp//FCI//Contract3//AbsoluteTiming

inp//FCI//Contract//AbsoluteTiming

inp2=inp//FCI

inp2//Contract[#,FCVerbose->1]&//AbsoluteTiming

inp//Contract//AbsoluteTiming