aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte/unicode.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2015-07-26 13:59:12 -0500
committerschneems <richard.schneeman@gmail.com>2015-07-30 12:31:04 -0500
commit57ba9cbc6ccaa20a1ac3ca671d17040946839db3 (patch)
tree7a6bbe0795df3a6407f318a1da0296d86503456f /activesupport/lib/active_support/multibyte/unicode.rb
parent1993e2ccbd7c5651278ea30bdc9d8034f5197945 (diff)
downloadrails-57ba9cbc6ccaa20a1ac3ca671d17040946839db3.tar.gz
rails-57ba9cbc6ccaa20a1ac3ca671d17040946839db3.tar.bz2
rails-57ba9cbc6ccaa20a1ac3ca671d17040946839db3.zip
Decrease allocations in transliterate
We can save a few objects by freezing the `replacement` string. We save a few more by down-casing the string in memory instead of allocating a new one. We save far more objects by checking for the default separator `"-"`, and using pre-generated regular expressions. We will save 209,231 bytes and 1,322 objects.
Diffstat (limited to 'activesupport/lib/active_support/multibyte/unicode.rb')
0 files changed, 0 insertions, 0 deletions