Counting FLOPS

Doug Gwyn gwyn at smoke.brl.mil
Sat Feb 16 06:31:44 AEST 1991


In article <5025 at umbc3.UMBC.EDU> rouben at 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.



More information about the Comp.unix.questions mailing list