Improved d2 calculation of saftsearchenginednahash

Yields a speedup of about 10%