Topics / Fast math and approximation

Performance topic

Fast math and approximation

Accept bounded error for speed: polynomial approximations, fast inverse square root, reduced precision and fast-math flags.

511proven techniques
23pitfalls: tried, then slower
238repositories
210from papers

Examples from real commits

xtensor-stack/xsimd 6.8× Add 2^52 to round to integer, subtract 2^52, and adjust for floor using bitwise ops. proof: commit → blender/cycles 2× Stochastically sample a single trilinear tap to approximate tricubic interpolation, reducing taps from 64 to 8. proof: commit →

Languages

  • C++180
  • C39
  • CUDA34
  • Python20
  • Rust17

Hardware

  • CPU111
  • x86111
  • NVIDIA GPU74
  • GPU63
  • ARM36

Fields

  • graphics143
  • math128
  • GPU71
  • compilers45
  • networking39

Where these come from

Repositories with the most techniques on this topic in the database:

genn-team/genn · 4google/highway · 4kornia/kornia-rs · 4google/swiftshader · 4Redot-Engine/redot-engine · 4mrdoob/three.js · 3google/brotli · 3Dao-AILab/flash-attention · 3ARM-software/optimized-routines · 3tenstorrent/tt-metal · 3

Ask Claude for the full answer

Each technique comes with its bottleneck, measured speedup, trade-offs, conditions and the commit or paper behind it, served to Claude through MCP.

claude mcp add --transport http adtomic https://www.adtomic.co/mcp

Connect Claude Pricing

Related topics

SIMD vectorizationBetter algorithmsPrecomputation and memoizationAvoiding allocationsEarly exit and pruning