Optimizes pieces of forwarding code.