Basically no difference.
I believe memtest86 is run from a stripped-down version of DOS or Linux. The OS provides a number of useful facilities such as threading, memory protection, process management, etc. You can duplicate them, and maybe optimize slightly, but it's probably not worth it.
Edit:
As noted above, the OS provides a lot of things you need, such as drivers and HD communication. A stripped-down Linux kernel is probably faster and easier to work with than writing all of these things yourself. Or, you could just kill processes/servers that are noncritical.
Even on my Windows XP install (a system not known for efficiency), with antivirus and firewall, etc the system is idle about 97% of the time.