diff options
| author | schneems <richard.schneeman@gmail.com> | 2015-07-26 13:59:12 -0500 |
|---|---|---|
| committer | schneems <richard.schneeman@gmail.com> | 2015-07-30 12:31:04 -0500 |
| commit | 57ba9cbc6ccaa20a1ac3ca671d17040946839db3 (patch) | |
| tree | 7a6bbe0795df3a6407f318a1da0296d86503456f /actionpack/lib/action_dispatch/testing/integration.rb | |
| parent | 1993e2ccbd7c5651278ea30bdc9d8034f5197945 (diff) | |
| download | rails-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 'actionpack/lib/action_dispatch/testing/integration.rb')
0 files changed, 0 insertions, 0 deletions
