rails/rails — comment on commit c41f08cefe6fa3747ee79001d9c88dc988e8064d
File: actionpack/lib/action_dispatch/routing/url_for.rb line 148
By sobrinho:

In the case of options is present, this will slow down a little bit:

``` ruby
require 'benchmark'
require 'active_support/core_ext/hash/keys'
require 'active_support/core_ext/object/try'

options = {}

puts Benchmark.realtime { 1_000_000.times { (options || {}).symbolize_keys } }
puts Benchmark.realtime { 1_000_000.times { (options.try(:symbolize_keys) || {}) } }
```

```
0.923583
1.240442
```