Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small refactor of the URL replacement code #14

Merged
merged 2 commits into from
May 30, 2011

Conversation

dcneiner
Copy link
Contributor

I ran some speed tests on the method currently used by Amplify to replace URL parameters with passed in data. I found using a regular expression replace with a callback was faster than redefining RegExp's for each item in a data structure.

You can see my perf tests here: http://jsperf.com/quick-templates-compared/2

These two commits handle the change to the faster method.

scottgonzalez added a commit that referenced this pull request May 30, 2011
Small refactor of the URL replacement code
@scottgonzalez scottgonzalez merged commit 40ba7d5 into mikehostetler:master May 30, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants