rails/rails — pull request #5570 by avakhov (2012-03-24 11:19:51+00:00)
Title: ActionController caching small String#split optimization

It's a little bit better to split on 2 parts.

``` ruby
require 'benchmark'

n = 50000
Benchmark.bm(7) do |x|
x.report("rails:") { n.times {"http://rubyonrails.org/documentation".split(%r{://}).last } }
x.report("my:") { n.times { "http://rubyonrails.org/documentation".split(%r{://}, 2).last } }
end
```

on my laptop:

```
user system total real
rails: 0.170000 0.000000 0.170000 ( 0.171520)
my: 0.090000 0.000000 0.090000 ( 0.096497)
```