tr can only replace a single character with a single fixed character (although you can put multiple matches of this sort in a single tr call) but is fast.
gsub can match complicated patterns using regex, and replace with a complicated computation result, but is slower than tr.