rails/actionview/lib
schneems 4d47220d7c Perf optimization for url_for called w/ Hash
Benchmarking the existing code:

```ruby
{ :only_path => options[:host].nil? }.merge!(options.symbolize_keys)) 
```

Against optimized code, that does not require a new hash or a merge:

```ruby
options = options.symbolize_keys
options[:only_path] = options[:host].nil? unless options.key?(:only_path)
options
```

We see a statistically significant performance gain:

![](https://www.dropbox.com/s/onocpc0zfw4kjxl/Screenshot%202014-08-14%2012.45.30.png?dl=1)

Updated to not mutate incoming parameters
2014-08-14 12:46:06 -05:00
..
action_view Perf optimization for url_for called w/ Hash 2014-08-14 12:46:06 -05:00
action_view.rb just require the template resolver 2014-01-31 12:05:50 -08:00