CryptoNight optimization