Skip to main content
QUICK REVIEW

[Paper Review] Performance of SSE and AVX Instruction Sets

Hwancheol Jeong, Sung‐Hoon Kim|arXiv (Cornell University)|Nov 5, 2012
Distributed and Parallel Computing SystemsComputer Science1 references26 citations
TL;DR

This paper evaluates the performance of SSE and AVX instruction sets for optimizing lattice gauge theory simulations through manual SIMD programming. By employing data packing, data reuse, and asynchronous prefetching, the authors demonstrate that AVX1 achieves up to 3× higher performance than SSE4.2 and over 10× speedup compared to plain C++ code, significantly improving computational efficiency in linear algebra-heavy physics workloads.

ABSTRACT

SSE (streaming SIMD extensions) and AVX (advanced vector extensions) are SIMD (single instruction multiple data streams) instruction sets supported by recent CPUs manufactured in Intel and AMD. This SIMD programming allows parallel processing by multiple cores in a single CPU. Basic arithmetic and data transfer operations such as sum, multiplication and square root can be processed simultaneously. Although popular compilers such as GNU compilers and Intel compilers provide automatic SIMD optimization options, one can obtain better performance by a manual SIMD programming with proper optimization: data packing, data reuse and asynchronous data transfer. In particular, linear algebraic operations of vectors and matrices can be easily optimized by the SIMD programming. Typical calculations in lattice gauge theory are composed of linear algebraic operations of gauge link matrices and fermion vectors, and so can adopt the manual SIMD programming to improve the performance.

Motivation & Objective

  • To evaluate the performance gains of SSE and AVX instruction sets in accelerating lattice gauge theory simulations.
  • To investigate how manual SIMD programming with data packing, reuse, and asynchronous data transfer improves computational efficiency.
  • To compare the performance of plain C++, SSE4.2, and AVX1 across different optimization levels and workloads.
  • To quantify the impact of arithmetic intensity and memory access patterns on SIMD performance.

Proposed method

  • Implementing SIMD operations using three approaches: inline assembly, intrinsic functions, and vector classes, with inline assembly used for maximum performance.
  • Applying data packing to load multiple floating-point values (4 single-precision or 8 single-precision) into XMM/YPM registers for parallel processing.
  • Using data reuse by keeping intermediate results in registers to minimize redundant memory transfers.
  • Employing prefetching instructions (e.g., `prefetch1`) to overlap data transfer with computation and reduce memory latency.
  • Measuring performance via CPU clock cycles for repeated summation and data copy operations across C++, SSE4.2, and AVX1.
  • Analyzing arithmetic intensity (AI) as a key metric to correlate computational throughput with memory bandwidth.

Experimental results

Research questions

  • RQ1How do SSE and AVX instruction sets compare in performance for numerical simulations in lattice gauge theory?
  • RQ2To what extent can manual SIMD programming with data packing and reuse outperform auto-optimized C++ code?
  • RQ3How effective is asynchronous data transfer via prefetching in reducing memory bottlenecks for SIMD workloads?
  • RQ4What is the impact of arithmetic intensity on the performance scaling of AVX versus SSE?
  • RQ5Can vector class abstractions match the performance of intrinsic functions or inline assembly in high-performance computing?

Key findings

  • AVX1 achieved a performance of 26.9 × 10⁴ CPU clocks for 10⁹ summations, compared to 732 × 10⁴ for plain C++ with no optimization, representing a 27× speedup.
  • SSE4.2 reduced the required clocks to 78.8 × 10⁴ under maximum optimization, still outperforming plain C++ by a factor of 9.3.
  • AVX1 was approximately 3 times faster than SSE4.2 for the same summation workload, demonstrating the benefit of wider YMM registers (256-bit) over XMM (128-bit).
  • Prefetching improved performance by 5% for AVX1 and 1.5% for SSE4.2, indicating limited effectiveness due to OS and system-level memory management interference.
  • Data reuse significantly reduced memory bandwidth pressure, with SIMD methods eliminating repeated reloading of the same data, thus improving arithmetic intensity.
  • The study confirms that manual SIMD optimization—especially using inline assembly—delivers substantially higher performance than compiler auto-optimization, even at maximum optimization levels.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.