Cryptonight optimizations