Optimize checksum