Mail Archives: pgcc/1999/05/10/09:02:59
'Dr H. T. Leung wrote:'
>
> If you had read the mailing list archive, it is terribly unfair to people
> on the list to cc you replies when you are not on the list. If you want to
> ask a question, subscribe, read on for a while, then post (then maybe
> unsubscribe).
>
> Your codes are very badly written (probably generated by automatic
> symbolic algebra packages like reduce/mathematica?). An optimized compiler
> can't help you much if your codes doesn't let itself be optimized. For a
> very simple example, You were doing multipication "Pv1*v01" 4 times; that
> means retrieves 2 values from memory, multiply, store it back, done 4
> times. Whereas you could have defined a new variable "Pv1_v01 = Pv1*v01",
> then it is two retrievals, multiplication once, storage once, then
> retrieval 4 times. You would be much better off spending some time
good compilers should optimize such expressions by itself, the method is
called "common subexpression optimization".
Ciao
Bernd
--
Bernd Melchers | melchers AT FU-Berlin DOT DE
Freie Universitaet Berlin | "We don't write software, we compose it."
AG Macromolecular Modelling - Prof. Dr. E.W. Knapp
for more information see http://userpage.chemie.fu-berlin.de/~melchers/
- Raw text -