Small CPU optimizations to ping requests/reponses.

Same idea as last commit.