tr: improve speed slightly
Merge pull request #462 from Arcterus/tr

tr: improve speed slightly