01 home
// featured · refactoring
Push Ifs Up and Fors Down: The Rewrite That Loses at 50/50 Data
The beloved refactor (hoist the branch to the caller, batch the loop) just got a category-theory proof and a Rust benchmark in the same month. The proof says it's legal; the benchmark says it loses at 50/50 data, and the disassembly explains why.
$
2026.10.13 · 5 min read · #refactoring