Small refactor of the URL replacement code #14

merged 2 commits into from May 30, 2011


None yet

2 participants


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:

These two commits handle the change to the faster method.

@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