Source:
crc.h
crc¶
CRC-16/CCITT-FALSE, a cheap well-distributed checksum used to notice that state changed.
More info¶
Game of Life is the caller today, hashing its grid each generation to detect that the pattern has gone static or fallen into a short oscillation, the same CRC recurring. It respawns then, instead of looping forever.
Which variant, and what it is not for¶
This is the textbook polynomial 0x1021 with an init of 0xFFFF and no reflection, the recognizable CCITT-FALSE variant.
It is no security hash, a CRC being trivially collidable; it is a fast change detector, which is all the stasis check needs. The implementation is integer-only with no table, the bit-serial form being tiny and the call sites running off the hot path, once per generation rather than per pixel.