Stefano Tommesani

  • Increase font size
  • Default font size
  • Decrease font size
Home SIMD SSE2 preview

SSE2 preview


The forthcoming Intel Pentium 4 processor (code-named Willamette)  will feature a new set of SIMD instructions that improve the capabilities of both the MMX and SSE instruction sets. The key benefits of SSE2 are that MMX instructions can work on 128-bit data blocks, and that SSE instructions now support 64-bit floating-point values. 
Extending the width of MMX parallel computations puts Intel’s integer SIMD processing capabilities on a par with Motorola’s AltiVec, used in the Macintosh G4 series: in the next section we will analyze the performance benefits of doubling the data block size and the effort required to turn old MMX code into shiny new SSE2 code.
The original SSE instruction set worked on 32-bit floating-point data elements, processing 4 of them in parallel (4x32 = 128 bit). This approach is finely tailored to 3D games engines, which perform lots of matrix by vector multiplies: the SSE multiplier can multiply a 4-elements vector by a row of a 4x4 matrix with a single instruction, yielding an effective 4x speed-up. The benefits of SSE accelerated geometry setup are likely to fade in the near future, thanks to the new generation of graphics boards that feature hardware-assisted triangle setup and lightning, but there is a long list of multimedia and scientific applications that could be greatly enhanced by parallel floating-point computations. Current RISC processors, such as the Digital Alpha, still offer better FP performance than x86 CPUs, even Athlons at 1 Ghz, and therefore they are the ideal platform to run scientific simulations. As this kind of software often performs computations on large data sets in a regular order, we can reasonably state that SSE instructions could be successfully applied and close the performance gap between x86 and RISC processors.
Unfortunately, some of them require the extra 64-bit precision that current SSE instructions do not support. The lack of 64-bit support should not be blamed on Intel designers: the main target for SSE is mainstream multimedia software, especially 3D games, where the precision difference between 32-bit and 64-bit FP computations would be hardly noticeable. However, Intel has always showed great interest in the scientific field: as an example, consider the Pentium processor, whose FP unit was much more powerful that the integer unit making it a strong contender for several applications, such as CAD.
SSE2 is designed to fix this problem: it supports both 32-bit and 64-bit floating point values, but  keeping the data block size fixed to 128-bits means that SSE2 instructions can only process two 64-bit data values in parallel. Even if the potential speed-up halves from four down to two, it is still compelling, as it enables a level of performance that normal FP code cannot match until 3+ Ghz processors come around. What’s more, peeking at the Pentium 4 microarchitecture reveals that the performance gain achieved by using SSE2 could actually be much greater than 2x, as the scalar FP unit suffers latencies that are much longer than on the P6 core, while the SSE2 unit is streamlined to offer blazing speed. The conclusion is that developers may be forced to use SSE2 instructions to effectively harness the FP power of the Pentium 4, and that the speed of current FP-intensive applications should be disappointing, considered the 2.0+ Ghz core frequency.


Latest Articles

Easily upload videos of security cameras to YouTube
In this example, we will import video from a Yi security camera into YouTube. The same process, with eventual adjustment to the naming of directories in the SD card used by the camera to record videos, will also apply to other
A software to stand out 27 January 2018, 14.35 Web
A software to stand out
Standing out of the pack starts by being visible, and being noticed by the right group of professionals. No matter how good your profile is, it is lost in a sea of similar profiles, so you need to show up and start attracting
Web page scraping, the easy way 07 January 2018, 00.46 Web
Web page scraping, the easy way
There are many ways to extract data elements from web pages, almost all of them prettier and cooler than the method proposed here, but as we are in an hurry, let's get that data quickly, ok? Suppose we have to extract the
Scraping dynamic page content 06 January 2018, 23.57 Web
Scraping dynamic page content
One of the most common roadblocks when scraping the content of web sites is getting the full contents of the page, including JS-generated data elements (probably, the ones you are looking for). So, when using CEFSharp to scrape
Unit-testing file I/O 26 November 2017, 12.09 Testing
Unit-testing file I/O
Two good news: file I/O is unit-testable, and it is surprisingly easy to do. Let's see how it works! A software no-one asked for First, we need a piece of software that deals with files and that has to be unit-tested. The