RouteSet: remove some code dups #6138

Merged
merged 1 commit into from May 3, 2012

Conversation

Projects
None yet
2 participants
@bogdan
Contributor

bogdan commented May 3, 2012

Remove some code dups.

Ensure no performance degrade (probably compiler optimization saved our souls):

https://gist.github.com/2584434


Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total        real
------------------------------------------------draw routes
After patch:    0.300000   0.010000   0.310000 (  0.310616)
Before patch:   0.300000   0.000000   0.300000 (  0.311043)

--------------------------------------simple URL generation
After patch:    0.010000   0.000000   0.010000 (  0.006107)
Before patch:   0.010000   0.000000   0.010000 (  0.006176)

-------------------------URL generation with params as hash
After patch:    0.080000   0.000000   0.080000 (  0.075196)
Before patch:   0.070000   0.010000   0.080000 (  0.075134)

-------------------------------URL generation with globbing
After patch:    0.070000   0.000000   0.070000 (  0.077017)
Before patch:   0.080000   0.000000   0.080000 (  0.077661)

josevalim added a commit that referenced this pull request May 3, 2012

Merge pull request #6138 from bogdan/routes
RouteSet: remove some code dups

@josevalim josevalim merged commit 5c0cbb3 into rails:master May 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment