Optimize CRC16 calculation