ArticleslgStudy

computer science

Streaming SIMD Extensions

Streaming SIMD Extensions is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Streaming SIMD Extensions rather than just read about it. In short: In computing, Streaming SIMD Extensions (SSE) is a single instruction, multiple data (SIMD) instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in its Pentium III series of central processing units (CPUs) shortly after the appearance of Advanced Micro Devices (AMD's) 3DNow!. SSE contains 70 new instructions (65 unique mnemonics using 70 encodings), most of which work on single…

Streaming SIMD Extensions — main illustration
Streaming SIMD Extensions — illustration

Key takeaways

  • Streaming SIMD Extensions belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Streaming SIMD Extensions to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Streaming SIMD Extensions from memory before moving on to harder problems.

Reference excerpt

In computing, Streaming SIMD Extensions (SSE) is a single instruction, multiple data (SIMD) instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in its Pentium III series of central processing units (CPUs) shortly after the appearance of Advanced Micro Devices (AMD's) 3DNow!. SSE contains 70 new instructions (65 unique mnemonics using 70 encodings), most of which work on single precision floating-point data. SIMD instructions can greatly increase performance when exactly the same operations are to be performed on multiple data objects. Typical applications are digital signal processing and graphics processing. Intel's first IA-32 SIMD effort was the MMX instruction set. MMX had two main problems: it re-used existing x87 floating-point registers making the CPUs unable to work on both floating-point and SIMD data at the same time, and it only worked on integers. SSE floating-point instructions operate on a new independent register set, the XMM registers, and adds a few integer instructions that work on MMX registers. SSE was subsequently expanded by Intel to SSE2, SSE3, SSSE3 and SSE4. Because it supports floating-point math, it had wider applications than MMX and became more popular. The addition of integer support in SSE2 made MMX largely redundant, though further performance increases can be attained in some situations by using MMX in parallel with SSE operations. SSE was originally called Katmai New Instructions (KNI), Katmai being the code name for the first Pentium III core revision. During the Katmai project Intel sought to distinguish it from its earlier product line, particularly its flagship Pentium II. It was later renamed Internet Streaming SIMD Extensions (ISSE), then SSE. AMD added a subset of SSE, 19 of them, called new MMX instructions, and known as several variants and combinations of SSE and MMX, or otherwise as Integer SSE (ISSE, not to be confused with Internet Streaming SIMD Extensions, an early name for SSE) shortly after with the release of the original Athlon in August 1999 (see 3DNow! extensions). AMD eventually added full support for SSE instructions (sometimes referred to as 3DNow! Professional) starting with its Athlon XP (Corvette and Palomino cores) and Duron (Morgan core) processors.

Registers SSE originally added eight new 128-bit registers known as XMM0 through XMM7. The AMD64 extensions from AMD added a further eight registers XMM8 through XMM15, and this extension is duplicated in the Intel 64 architecture. There is also a new 32-bit control/status register, MXCSR. The registers XMM8 through XMM15 are accessible only in 64-bit operating mode.

SSE used only a single data type for XMM registers:

four 32-bit single-precision floating-point numbers SSE2 would later expand the usage of the XMM registers to include:

two 64-bit double-precision floating-point numbers or two 64-bit integers or four 32-bit integers or eight 16-bit short integers or sixteen 8-bit bytes or characters. Because these 128-bit registers are additional machine states that the operating system must preserve across task switches, they are disabled by default until the operating system explicitly enables them. This means that the OS must know how to use the FXSAVE and FXRSTOR instructions, which is the extended pair of instructions that can save all x86 and SSE register states at once. This support was quickly added to all major IA-32 operating systems. The first CPU to support SSE, the Pentium III, shared execution resources between SSE and the floating-point unit (FPU). While a compiled application can interleave FPU and SSE instructions side-by-side, the Pentium III will not issue an FPU and an SSE instruction in the same clock cycle. This limitation reduces the effectiveness of pipelining, but the separate XMM registers do allow SIMD and scalar floating-point operations to be mixed without the performance hit from explicit MMX/floating-point mode switching.

SSE instructions SSE introduced both scalar and packed floating-point instructions.

Floating-point instructions Floating operations are IEEE 754-1985 compliant, with the exception of RSQRTSS, which is not specified in the standard.

Memory-to-register/register-to-memory/register-to-register data movement Scalar – MOVSS Packed – MOVAPS, MOVUPS, MOVLPS, MOVHPS, MOVLHPS, MOVHLPS, MOVMSKPS Arithmetic Scalar – ADDSS, SUBSS, MULSS, DIVSS, RCPSS, SQRTSS, MAXSS, MINSS, RSQRTSS Packed – ADDPS, SUBPS, MULPS, DIVPS, RCPPS, SQRTPS, MAXPS, MINPS, RSQRTPS Compare Scalar – CMPSS, COMISS, UCOMISS Packed – CMPPS Data shuffle and unpacking Packed – SHUFPS, UNPCKHPS, UNPCKLPS Data-type conversion Scalar – CVTSI2SS, CVTSS2SI, CVTTSS2SI Packed – CVTPI2PS, CVTPS2PI, CVTTPS2PI Bitwise logical operations Packed – ANDPS, ORPS, XORPS, ANDNPS

Integer instructions Arithmetic PMULHUW, PSADBW, PAVGB, PAVGW, PMAXUB, PMINUB, PMAXSW, PMINSW Data movement PEXTRW, PINSRW Other PMOVMSKB, PSHUFW

Other instructions MXCSR management LDMXCSR, STMXCSR Cache and Memory management MOVNTQ, MOVNTPS, MASKMOVQ, PREFETCH0, PREFETCH1, PREFETCH2, PREFETCHNTA, SFENCE

Example The following simple example demonstrates the advantage of using SSE. Consider an operation like vector addition, which is used very often in computer graphics applications. To add two single precision, four-component vectors together using x86 requires four floating-point addition instructions.

This corresponds to four x86 FADD instructions in the object code. On the other hand, as the following pseudo-code shows, a single 128-bit 'packed-add' instruction can replace the four scalar addition instructions.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Streaming SIMD Extensions

Start with the simplest possible case. Write down what Streaming SIMD Extensions claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Streaming SIMD Extensions before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Streaming SIMD Extensions ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Streaming SIMD Extensions

In research
Streaming SIMD Extensions appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Streaming SIMD Extensions in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Streaming SIMD Extensions is common in secondary-school and first-year university syllabi. It links to neighbouring topics Instruction set extensions, SIMD computing, X86 instructions, so understanding it makes those chapters shorter.
In everyday life
Look for Streaming SIMD Extensions outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Streaming SIMD Extensions” →

How to study Streaming SIMD Extensions in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Streaming SIMD Extensions means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Streaming SIMD Extensions out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Streaming SIMD Extensions in simple terms?

In computing, Streaming SIMD Extensions (SSE) is a single instruction, multiple data (SIMD) instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in its Pentium III series of central processing units (CPUs) shortly after the appearance of Advanced Micro Devices…

Why does Streaming SIMD Extensions matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Streaming SIMD Extensions?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Streaming SIMD Extensions.

Tags

  • Instruction set extensions
  • SIMD computing
  • X86 instructions

Keep exploring