Raw FPU power: FLOPS

Let us see if we understand floating-point performance better when we look at FLOPS. FLOPS was programmed by Al Aburto and is a very floating-point intensive benchmark. Analysis show that this benchmark contains:

  • 70% floating-point instructions
  • Only 4% branches
  • Only 34% of instructions are memory instructions

Benchmarking with FLOPS is not real world, but isolates the FPU power. Al Aburto states the following about FLOPS:

"Flops.c is a 'C' program which attempts to estimate your systems floating-point 'MFLOPS' rating for the FADD, FSUB, FMUL, and FDIV operations based on specific 'instruction mixes'. The program provides an estimate of PEAK MFLOPS performance by making maximal use of register variables with minimal interaction with main memory. The execution loops are all small so that they will fit in any cache."

FLOPS shows the maximum double precision power that the core has, by making sure that the program fits in the L1 cache. FLOPS consists of eight tests, and each test has a different but well-known instruction mix. The most frequently used instructions are FADD (addition, 1st number), FSUB (subtraction, 2nd number), and FMUL (multiplication, 3rd number). FDIV is the fourth number in the mix. We focused on four tests (1, 3, 4, and 8) as the other tests were very similar.

We compiled three versions:

  • Gcc (GCC) 4.1.2 20070115 (prerelease) (SUSE Linux)
  • Intel C Compiler (ICC) version 10.1 20070913:
    • An x87 version
    • A fully vectorized SSE2 version

Let us restate what we are measuring with FLOPS:

  • Single-threaded double precision floating performance
  • Maximum performance not constrained by bandwidth bottlenecks or latency delays
  • Perfect clock speed scaling

This allows us to calculate the FLOPS per cycle number: we divide the MFLOPs numbers reported by FLOPS by the clock speed. This way we get a good idea of the raw floating-point power of each architecture. First we test with the basic '-O3' optimization.



Don't you love the little FLOPS benchmark? It is far from a real world benchmark, but it tells us so much.

To understand this better, know that the raw speed of the AMD out of order x87 FPU (Athlon K7 and Athlon 64) used to be between 20% and 60% faster clock for clock than any P6 based CPU, including Banias and Dothan. However, this x87 FPU advantage has evaporated since the introduction of the Core architecture as the Core Architecture has a separate FMUL and FADD pipe. (Older P6 architectures could execute one FADD followed by one FMUL, or two FP operations per two clocks at the most). You can see that when we test with a mix of FADD/FSUB and FMUL, the Core architecture is slightly faster clock for clock.

The only weakness remaining in the Core x87 architecture is the FP divider. Notice how even a relatively low percentage of divisions (the 4th number in the mix) kills the performance of our 65nm Xeon. The Opteron 22xx and 23xx are 70% faster (sometimes more) when it comes to double precision FP divisions. However, the new Xeon 54xx closes this gap completely thanks to lowering the latency of a 64-bit FDIV from 32 cycles (Xeon 53xx) to 20 cycles (Xeon 54xx, Opteron 23xx). The Xeon 54xx is only 1% to 5% slower in the scenarios where quite a few divisions happen. That is because the Opterons are capable of somewhat pipelining FDIVs, which allows them to retire one FDIV every 17 cycles. The clock speed advantage of the 45nm Xeon (3.2GHz vs. 2.5GHz maximum at present) will give it a solid lead in x87 performance.

However, x87 performance is not as important as it used to be. Most modern FP applications make good use of the SSE SIMD instruction set. Let us see what happens if we "vectorize" our small FLOPS loops. Remember, FLOPS runs from the L1 cache, so L2 and memory bandwidth do not matter at all.



When it comes to raw SSE performance, the Intel architectures are 3% to 14% faster in the add/subtract/multiply scenarios. When there are divisions involved, Barcelona absolutely annihilates the 65nm Core architecture with up to 80% better SSE performance, clock for clock. It even manages to outperform the newest 45nm Xeon, but only by 8% to 18%. Notice once again the vast improvement from the 2nd generation Opteron to the 3rd generation Opteron when it comes to SIMD performance, ranging from 55% to 150% (!!).

As not all applications are compiled using Intel's high-performance compiler, we also compiled with the popular open source compiler gcc. Optimization beyond "-O3" had little effect on our FLOPS binary, so we limited our testing to one binary.



GCC paints about the same picture as ICC without vectorization. The new AMD Barcelona core has a small advantage, as it is the fastest chip in 3 out of 4 tests. Let us now see if we can apply our FP analyses of LINPACK and FLOPS to real world applications.

Floating-point Analyses (Linux 64-bit) 3ds Max 9 (32-bit Windows)
Comments Locked

43 Comments

View All Comments

  • tshen83 - Tuesday, November 27, 2007 - link

    Seriously, can you buy the 2360SE? Newegg doesn't even stock the 1.7Ghz 2344HEs.

    The same situation exist on the Phenom line of CPUs. I don't see the value of reviewing Phenom 9700, 9900s when AMD cannot deliver them. I am trouble locating Phenom 9500s.
  • alantay - Tuesday, November 27, 2007 - link

    The MySQL scalability problem is not so much in MySQL as in the Linux kernel and Glibc used.

    To have it scale correctly to 8 CPUs you need kernel 2.6.22.x (alternatively you could try with a 2.6.24-RC -should be a bit faster-, but not with 2.6.23.x) and Glibc 2.6 or higher.

    A default Ubuntu 7.10 for example should scale well with MySQL (OpenSUSE 10.3 *might* work, but they have backported the 2.6.23 scheduler which has a scalability problem).

    Thanks for the article!
  • JohanAnandtech - Tuesday, November 27, 2007 - link

    Excellent feedback.

    It is a bit frustrating that once again you need some ultra new kernel and libraries to get good scalability. THat is unrealistic for people who use SLES and who rely on their support contract to get updates.
  • MGSsancho - Wednesday, November 28, 2007 - link

    how about opensolaris? i dont know how much different it is from solaris 10, but it should be able to scale to dozens of cores nicely. I was about to ask about oracle and DB2 benchmarks but you answered that in your article; expensive, and the oems usually publish that info.

    anyways awesome article
  • Roy2001 - Tuesday, November 27, 2007 - link

    I cannot find a SINGLE one, nowhere.
  • drebo - Tuesday, November 27, 2007 - link

    Newegg has the Phenom 9500 in stock. At least, they did yesterday. I've also got a vendor I use that has them in stock.
  • JarredWalton - Tuesday, November 27, 2007 - link

    But Phenom isn't Opteron 23xx. Different socket, different market, and it has L3. (Does Phenom X4 have an L3 cache? Maybe I should go check....)
  • drebo - Wednesday, November 28, 2007 - link

    Yes, Phenom 9500 has an L3. But if you look at his question (in the subject line), he is asking about barcelona as a whole and phenom specifically. The answer is Yes, they are available.
  • Slaimus - Tuesday, November 27, 2007 - link

    They may be gobbled by up Cray for that Budapest supercomputer.
  • Regs - Tuesday, November 27, 2007 - link

    I would not expect any from vendors and wholesalers until early next year.

    Matter of fact I wouldn't want one until then anyhow. I would at least wait until B3 stepping.

Log in

Don't have an account? Sign up now