www.cpuplanet.com/features/article.php/1487301

Back to Article




Multimedia Extensions: Do MMX, 3DNow!, and SSE Still Matter?
October 23, 2002

The Answer Is Yes, But the Hype Has Died Down

You've seen the terms 3DNow!, MMX, and SSE (or SSE-2) bandied about, but have you ever wondered exactly what they mean? The simple answer is that they're multimedia extensions (hence the acronym MMX) or additions to the venerable x86 instruction set or code architecture used in Windows PCs -- shortcuts that programmers can use to make applications run faster.

The more complex answer is that they're CPU marketing terms, with growing uncertainty about their value in the grand scheme of things considering their software support and the vast increases in processor speed and 3D graphics or video-card performance over the last few years.

Technically speaking, MMX, 3DNow!, and SSE all add Single Instruction Multiple Data (SIMD) techniques to x86 programming -- instructions that make use of parallelism to apply the same operation to a number of data items, or perform more (of the same types of) calculations at the same time.

Normally, a CPU works in a one-by-one sequence, with a single data stream using a single instruction. SIMD applies the instruction to multiple data streams -- packing, for instance, eight 16-bit values into CPU registers and then adding or multiplying them in parallel, in much the same way that multiple processors can. One analogy might be to compare the time spent giving an order -- "Prepare budget forecasts for Friday's meeting" -- to members of a business workgroup individually, versus telling them simultaneously in a conference call.

Applying the same instruction to multiple data points can save a lot of time in multimedia and graphics applications with relatively small, repetitive loops -- creating all the pixels or triangles that make up a screen scene in a 3D game, for example. Even though real-world applications rarely (if ever) achieve all the theoretically possible speed boost from parallel execution, with the right software, gains can be quite significant -- when Intel debuted the Pentium MMX, it claimed that moving from scalar C code to MMX code could double the speed of a particular speech-recognition decoding function, or accelerate audio echo effects sixfold or 3D bilinear texture mapping sevenfold.

Intel and AMD Play Leapfrog

This was in January 1997, when Intel's 200MHz Pentium MMX succeeded the plain Pentium and launched the SIMD revolution. MMX enlarged the x86 repertoire with 57 new multimedia instructions and four new data types, such as a "packed byte" -- 8 bytes, such as eight 8-bit graphics pixels, packed into one 64-bit quantity.

The MMX instruction set, however, handled only integer operations, leaving a window of opportunity for x86 rival AMD. The latter climbed through the window with 3DNow!, which added 21 instructions including support for SIMD floating-point operations (plus backward compatibility with MMX) when it premiered in the K6-2 processor in May 1998. The K6-2 also boasted initial clock speeds of up to 333MHz.

Intel went back to the lab with 70 more instructions, codenamed MMX2 or KNI (Katmai New Instructions) but formally introduced as SSE -- Streaming SIMD Extensions, touted to improve streaming video and audio from Internet sites -- with the Pentium III, launched at 500MHz in February 1999.

AMD anted up with Enhanced 3DNow!, incorporating streaming instructions, in the Athlon a few months later, and 3DNow! Professional, which added full compatibility with software designed for Intel's SSE, with the Athlon "Palomino" revision in May 2001. By then, Intel's Pentium 4 had appeared with SSE-2, which added still another 144 instructions including support for double-precision floating-point values. (AMD is expected to include SSE-2 support in its forthcoming Hammer family.) Meanwhile, microarchitecture enhancements allowed for additional registers and easier coding compared to older SIMD-compatible CPUs.