improve performance of crc()

by using eval() outside of the loop (thanks to suggestion by
@vprimachenko)