Xref: utzoo comp.unix.questions:28737 comp.unix.wizards:24130 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!udel!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Counting FLOPS Message-ID: <15215@smoke.brl.mil> Date: 15 Feb 91 19:31:44 GMT References: <5025@umbc3.UMBC.EDU> Followup-To: comp.unix.questions Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 20 In article <5025@umbc3.UMBC.EDU> rouben@math9.math.umbc.edu writes: >How does one count the number of floating point operations (flops) during >the execution of a C program? I for one would have to know exactly what is meant by a "FLOP". I'm not being facetious; there is considerable truth to the saying that "there are lies, damned lies, and benchmarks". (Originally "statistics" was the third category, but it was adapted for modern purposes.) On all computing architectures known to me, different floating-point operations take different amounts of time, sometimes in fact dependent on the content of the data being operated on; thus an measure such as "FLOPs per second" is not a very well- defined quantity. On the other hand, in some implementations that I know of, the floating-point processor is involved in executing some operations on what would probably be considered "integer" data; is it intended that those operations be counted or excluded? It may be that your best bet would be to rely on total time required to perform some lengthy computation (perhaps numerous iterations of some shorter computation), rather than number of operations as such.