Calculating MFLOPS

  • Thread starter Thread starter Miller
  • Start date Start date
M

Miller

Hi,

Can someone tell me how to calculate MFLOPS for the following C# code
(on a Pentium 4 2.0 Ghz)?

for (i=0; i<n; i++)
{
for (j=0; j<n; j++)
{
for (k=0; k<n; k++)
{
C[i,j] = C[i,j] + A[i,k] * B[k,j];
}
}
}

Thanks!

Miller
 
What's the point of calculating MFLOPS? What does it show us when
normally we can't get the maximum amount of floating point operations,
as we should. What can we normally tell with such a measure? I'm sure
two different compilers (doing different things) would give separate
results... so can we then predict how good or bad one is from the other?

Thanks

James
 
James said:
What's the point of calculating MFLOPS? What does it show us when
normally we can't get the maximum amount of floating point operations,
as we should. What can we normally tell with such a measure? I'm sure
two different compilers (doing different things) would give separate
results... so can we then predict how good or bad one is from the other?

The MegaFLOP (million floating point operations per second) is an old
measure of supercomputer performance, dating from the days when
supercomputers ran at 50 MHz.

Many operating systems let you measure the CPU time of an individual thread.
That's how it was normally done, although I occasionally saw MFLOP ratings
based on "wall clock time" instead. In that case you'd do your best to keep
other threads from running during the test.
 
Michael A. Covington said:
other?

The MegaFLOP (million floating point operations per second) is an old
measure of supercomputer performance, dating from the days when
supercomputers ran at 50 MHz.

Or you're desperately trying to sell Apple computers, in which
case you might as well claim it goes "1,000,000 MPH"

:)

-c
 
Back
Top