Improve decoding performance by making digits checks faster.