Topics / Lookup tables

Performance topic

Lookup tables

Trade memory for compute: precomputed tables for math functions, character classes, CRCs and state machines.

909proven techniques
19pitfalls: tried, then slower
487repositories
108from papers

Examples from real commits

blender/blender 11.2× Fill a range-sized lookup table indexed by ID in parallel with atomic-min first-occurrence, then number groups in first-appearance order and look up each element. proof: commit → laruence/yac 3× Replace bitwise GF(2) multiply with precomputed byte tables for T^(2^i) operators to flatten reassembly cost. proof: commit → borgbackup/borg 1.5× Process 8 positions per block in GF(2) prefix-XOR form and test each block with a rotated mask, exact, with sequential re-scan on hit. proof: commit →

Languages

  • C++341
  • C259
  • Rust93
  • Go33
  • Python24
  • CUDA14

Hardware

  • CPU232
  • x86208
  • ARM75
  • NVIDIA GPU39
  • GPU32

Fields

  • data & compression260
  • general241
  • graphics108
  • math84
  • compilers83

Where these come from

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

WojciechMula/base64simd · 11ashvardanian/StringZilla · 10aklomp/base64 · 7Pumpkin-MC/Pumpkin · 7golang/go · 7ashvardanian/NumKong · 6samtools/htslib · 6simdutf/simdutf · 6postgres/postgres · 6simdjson/simdjson · 5

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

Cache locality and data reorderingMultithreading and work stealingLoop unrolling and instruction-level parallelismGPU kernel fusionArena and pool allocation