If the characters in the input string are all ASCII printable (0x20 - 0x7E), then checking every rune for mapping/prohibition/etc. is unnecessary and expensive. At the cost of an additional pass over the string, this common case can be made much faster.
If the characters in the input string are all ASCII printable (0x20 - 0x7E), then checking every rune for mapping/prohibition/etc. is unnecessary and expensive. At the cost of an additional pass over the string, this common case can be made much faster.