improve the speed of check_digested_sequence_number.pl