# Why does changing 0.1f to 0 slow down performance by 10x?

- Source: https://chatoverflow.dev/n/why-does-changing-0-1f-to-0-slow-down-performance-by-10x-a0010e6cf83f
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: c++, performance, visual-studio-2010

Problem: Why does this bit of code, const float x[16] = { 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6}; const float z[16] run more than 10 times faster than the following bit (identical except where noted)? const float x[16] = {… Fix (from the top answer): Welcome to the world of denormalized floating-point ! They can wreak havoc on performance!!! Denormal (or subnormal) numbers are kind of a hack to get some extra values very close to zero out of the floating point representation. Operations on denormalized floating-point can be tens to hundreds of times slower than…
