When you're aiming for small code, performance is the last of your worries. A couple years back I decided to implement a complete bootloader that could read a kernel from NTFS in the MBR -- 510 bytes usable. While performance would've been nice, just getting it into that space was a massive(ly fun) chore.