hex2int
I presume the lookup table code comes from the hex2string/string2hex code. I added it there because it significantly speed up operations with long strings, while keeping compatibility (your shift solution would probably be faster, though). The reason it works well there is because the strings in
hex2int
Yes, but wasn't sscanf the fast code? sscanf is fast. Taking the code from sscanf and putting it in a stand alone function is not as fast. This is what confuses me.