Tag

Transmeta

1 stories

256KB of code to zero 64KB of memory, fixed mid-emulation (devblogs.microsoft.com)

Each write-byte instruction was 4 bytes. 65,536 of them meant 256 kilobytes of machine code to initialize 64 kilobytes of stack: a 4:1 code-to-data ratio.

Rather than run the bloat as written, the binary translator recognized the monstrous function and substituted the compact loop the compiler should have emitted.

The asterisk from the thread: maybe it wasn't a bug at all, and the fully unrolled version was actually faster on the real hardware.