The time the x86 emulator team found code so bad they fixed it during emulation
Points and comments are a snapshot, not live.
An x86 emulator team patched a fully unrolled 64KB stack-initialization loop to restore performance.
During Windows development for a non-x86 processor, a binary-translation emulator encountered a program that allocated 64KB on the stack. The compiler had "optimized" the initialization by unrolling the loop into 65,536 individual 4-byte write instructions, producing 256KB of code for 64KB of data. The emulator team was so offended that they added special translation logic to detect this pattern and replace it with an equivalent tight loop.
The article, by Raymond Chen on The Old New Thing (June 15, 2026), does not specify the target processor (Alpha, Itanium, etc.) but notes the emulator acted as a JIT-like binary translator.
What commenters are saying
Commenters identified Windows NT's x86 emulation for non-x86 architectures (DEC Alpha, Itanium via IA-32 Execution Layer) as the likely context. The thread noted that GPU drivers, Wine/Proton, and browser engines also include per-application workarounds for buggy code, citing examples like SimCity's read-after-free fix in Windows 95 and Nvidia's game-specific optimizations. Some debated whether the compiler was Microsoft's, while others pointed to similar practices in Transmeta's code morphing software.