Hello Tim, I am grateful to your comments. I had started this thread to know about a concept regarding difference in execution timings in two scenarios i had mentioned. I guess, I still havn't got answer to that. I need to know among those scenarios, in which case GCC would give better performance? I am not clear about this concept, and am seeking clarification. I gave details of my work just to give a feel, otherwise I need to know about the concept, irrespective of the work being done. Regards, Nirav Shah. On Mon, Dec 1, 2008 at 3:52 AM, Tim Prince <TimothyPrince@xxxxxxxxxxxxx> wrote: > Nirav Shah wrote: > >> >> I am working on study of data sharing characteristic of Blackscholes >> application of Parsec benchmark. I need to come up with better data >> sharing foot print of execution. > >> No expression is evaluated in loop nor any particular intermediate >> result is used more than once. Given this, can I get benefit in terms >> of lesser clock cycle to execute the computation if done in a single >> statement as compared to done over multiple statements with local >> variables? >> >> Regards, >> Nirav Shah. > Black-Scholes benchmarking has consumed a great deal of technical > marketing time, without in most cases divulging source code. Referring > to a public example, http://www.espenhaug.com/black_scholes.html which > doesn't seem to bear much relationship to your comments. That example > shows an apparent total ignorance of Horner's rule, along with the > unexplained sequence (1 - (1 - .....), protected against simplification by > -ffast-math. Maximum delay and cancellation of precision for minimum effort. > The Fortran-ish version (not compliant with any Fortran standard, but may > "work") tries to prevent optimization by using floating point exponents, > but that's not as much of a sin as evaluating a polynomial with multiple > pow() evaluations. > > The whole thing is complicated enough that you would want to use at least > gprof to determine where you could work usefully to improve performance. > If you were set this exercise as a university project, was it really the > intent to solicit uniformed opinions about how to proceed? > > I'm amazed at the Parsec site claim to support world-wide downloads, it's > so slow. > >