felipe,
Something worth timing is the difference between this code,
cmp byte ptr[edi],30h ; Is a number?
jb bad
cmp byte ptr[edi],39h
ja bad
and code something like this.
movzx eax, BYTE PTR [edi] ; an extra line of code
cmp eax, 30h ; do the comparisons in native data size where possible
jb bad
cmp eax, 39h
ja bad
For the extra instruction, you reduce the memory access count from 2 to 1 and sometimes this will give you a speed gain as memory is a lot slower than accessing a register.