Linux (well, at least my 2.6 kernel) tests several different possible code paths for memset() during boot, and dynamically links the fastest one. If you statically link, however, you get the bog standard one regardless of which one is fastest.
Knowing is half the battle!