Use `sub` as we only need to substitute once. #595

Merged
merged 1 commit into from Aug 22, 2013

Conversation

Projects
None yet
2 participants
Contributor

benpickles commented Aug 20, 2013

I hope you like micro optimisations...

           user     system      total        real
gsub   0.030000   0.000000   0.030000 (  0.024439)
sub    0.000000   0.000000   0.000000 (  0.008700)

https://gist.github.com/benpickles/6286953

spastorino added a commit that referenced this pull request Aug 22, 2013

Merge pull request #595 from benpickles/use-sub-not-gsub
Use `sub` as we only need to substitute once.

@spastorino spastorino merged commit 53e927c into rack:master Aug 22, 2013

1 check passed

default The Travis CI build passed
Details

@benpickles benpickles deleted the benpickles:use-sub-not-gsub branch Aug 23, 2013

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