Skip to main content
QUICK REVIEW

[Paper Review] Short Note on Costs of Floating Point Operations on current x86-64 Architectures: Denormals, Overflow, Underflow, and Division by Zero

Markus Wittmann, Thomas Zeiser|arXiv (Cornell University)|Jun 12, 2015
Parallel Computing and Optimization TechniquesComputer Science4 citations
TL;DR

This paper quantifies the performance costs of floating-point exceptions—denormals, overflow, underflow, and division by zero—on modern x86-64 processors using AVX, AVX2, and FMA3/4 instructions. It shows that without FTZ/DAZ, denormalized operations incur a 100x performance penalty, while FMA operations are only costly when the addition component underflows. The key contribution is empirical measurement of cycle-level latency across Intel and AMD systems, revealing that disabling FTZ/DAZ can severely degrade performance in numerical workloads.

ABSTRACT

Simple floating point operations like addition or multiplication on normalized floating point values can be computed by current AMD and Intel processors in three to five cycles. This is different for denormalized numbers, which appear when an underflow occurs and the value can no longer be represented as a normalized floating-point value. Here the costs are about two magnitudes higher.

Motivation & Objective

  • To quantify the performance impact of floating-point exceptions—denormals, overflow, underflow, and division by zero—on modern x86-64 processors.
  • To evaluate how the use of FTZ (Flush-to-Zero) and DAZ (Denormals-Are-Zero) modes affects execution latency in floating-point operations.
  • To measure the performance difference between normalized and denormalized floating-point operations using AVX, AVX2, and FMA3/4 instruction sets.
  • To identify which floating-point operations incur the highest performance penalties when exceptions occur, particularly in FMA instructions.

Proposed method

  • Micro-benchmarks were implemented in C/C++ and assembly to isolate floating-point operations on double-precision vectors.
  • The inner loop was vectorized using AVX instructions to process four elements per cycle, minimizing memory bottlenecks.
  • Measurements were taken with and without FTZ and DAZ modes enabled by manipulating the MXCSR control register via intrinsic functions.
  • Latency was measured using high-resolution timing on three Intel (SandyBridge, IvyBridge, Haswell) and one AMD (Interlagos) systems.
  • Four operation types were benchmarked: addition, multiplication, division, and fused-multiply-add (FMA), with inputs configured to trigger specific exceptions.
  • Results were reported as cycles per operation, with normalized and exceptional cases compared across different processor microarchitectures.

Experimental results

Research questions

  • RQ1What is the performance cost of denormalized floating-point operations compared to normalized ones on current x86-64 processors?
  • RQ2How do FTZ and DAZ modes affect the latency of floating-point operations involving underflow, overflow, or division by zero?
  • RQ3Are FMA operations more or less sensitive to underflow than separate multiplication and addition instructions?
  • RQ4Does the presence of NaN values or division by zero significantly increase execution time in AVX and FMA instructions?

Key findings

  • On Intel Haswell and AMD Interlagos, normalized AVX addition and multiplication take 3–5 cycles, but underflowed operations (without FTZ/DAZ) take 30–40 cycles, a 10x to 100x penalty.
  • Division by zero is fast (4–5 cycles) when FTZ/DAZ are enabled, but becomes significantly slower (up to 64 cycles) when denormalized operands are involved.
  • For division, underflow in the dividend or divisor increases latency from ~7 cycles to up to 56.5 cycles on Haswell, indicating a major performance hit.
  • FMA operations are only costly when the addition component underflows: FMA with multiplication underflow incurs no penalty, but FMA with addition underflow takes 33.5–36.5 cycles.
  • With FTZ and DAZ enabled, all exceptional cases (underflow, overflow, NaN, division by zero) have negligible performance impact, matching normalized operation latency.
  • The performance penalty for denormalized inputs is most severe in division and addition, while multiplication and FMA show more nuanced behavior depending on which component underflows.

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.