Actions
Patch #29363
closedUse String#tr instead of String#gsub
Description
String#tr is more than 3 times faster than String#gsub when replacing a single character in a string with another single character.
https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
Files
Actions