| The time the x86 emulator team found code so bad they fixed it during emulation(devblogs.microsoft.com) | |
| 492 points by paulmooreparks 1 day ago | 168 comments | |
tl;dr: A Windows x86-32 binary translation emulator team encountered a program that allocated 64KB on the stack and initialized it by unrolling the init loop into 65,536 individual byte-write instructions—256KB of code to zero 64KB of data. Rather than faithfully translating this monstrosity, the team added special-case detection to recognize the pattern and replace it with an equivalent tight loop during translation. | |
HN Discussion:
| |