Dear Vladyslav,
On Sun, 04 Jan 2015 00:48:23 +0100, Vladyslav Shtabovenko <v.shtabovenko@tum.de> said: VSh> I'm wondering about the performance of simplify_indexed applied VSh> to a long chain of Dirac matrices in D dimensions.
You raised a valid concern. Let me provide some background. Historically, GiNaC was dealing with Dirac matrices associated to the Lorentz metric only. At some point the code was expanded to treat an algebra with a general commuting/anticommuting relation between generators. Since the generality reduced performance, the original code optimised for Dirac matrices was preserved as much as possible. I checked your example, it did not call to general time-consuming cliffordunit::contract_with(), canonicalize_clifford() and get_metric(). Instead, it (as it is supposed to do) made numerous calls to clifford::eval_ncmul() and diracgamma::contract_with(). I believe that the later two functions are mainly as they were in the original GiNaC code optimised for Dirac matrices. So, a further investigation of the code is required.... Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835