From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Peter Bienstman" To: Subject: performance of complex arithmetic Date: Sun, 31 Jan 1999 23:58:00 -0000 Message-ID: <199901260908.KAA19127@allserv.rug.ac.be> X-SW-Source: 1999-01n/msg00988.html Message-ID: <19990131235800.VIMK5NV8Is5Rh3Fx2b_bSwkP6YDBUwScrZYg_kIPWyE@z> Hello, I have a question regarding EGCS's performance on complex arithmetic. A first point regards the following switch for g77: '-fno-emulate-complex' Implement `COMPLEX' arithmetic using the facilities in the `gcc' back end that provide direct support of `complex' arithmetic, instead of emulating the arithmetic. `gcc' has some known problems in its back-end support for `complex' arithmetic, due primarily to the support not being completed as of version 2.7.2.2. Other front ends for the `gcc' back end avoid this problem by emulating `complex' arithmetic at a higher level, so the back end sees arithmetic on the real and imaginary components. Is it true that the g++ ang g77 frontends still emulate complex arithmetic? This would seem like a significant performance penalty, as the optimiser would probably miss out on some optimisations. Secondly, I was wondering if g++ is able to eliminate complex temporaries the same way it is able to eliminate e.g. real or integer temporaries. A while ago, this was a point of concern on the Blitz mailing list. Is any work being done on the improvement of complex arithmetic? The code I'm writing relies heavily on complex numbers, so it would be really bad news if an otherwise great compiler wouldn't perform well in this area. Greetings, ------------------------------------- Peter Bienstman Department of Information Technology INTEC/IMEC - University of Gent St.-Pietersnieuwstraat 41 B-9000 Gent - Belgium E-mail: Peter.Bienstman@rug.ac.be Tel: +32 9 264 3445 Fax: +32 9 264 3593 -------------------------------------