in reply to The indisputable speed of tr///
tr/// is only going to help you if all of your transformations are 1:1 in terms of chars. If there are any examples of 1:N then its not going to help you. IE, if you need to convert chars with umlouts to their non-umlaut equivelents then tr/// wont help you. As for it being faster im surprised there was any question. Especially with the code you are using. join/map/split is a pretty horrible way to handle this. If i had to use a hash id do something like s/([...])/$map{$1}/g which is isnt going to be faster than tr/// but will certainly be faster than join/map/split.
|
---|