-
Notifications
You must be signed in to change notification settings - Fork 339
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
Stripe.URI Efficiency #105
Comments
Yes could leverage iodata and to some extend maybe a bit of https://github.com/benoitc/hackney/blob/master/doc/hackney_url.md |
Yeah. I have an implementation using iodata in another system. I may just copy it over. |
If your goal is to remove the ++ operation (which I understand for performance reasons) wouldn't the simple fix be something like this?
or do you want to avoid Enum.reverse as well? I haven't read the source on that one but I assumed one round of it was OK. |
The The solution that you have given looks like an improvement, but I think the overall logic (such as use of |
@fastjames given that I think if you want to open a PR to spike this out and see if @DavidAntaramian or someone else can provide feedback on that, I'd be really thankful! |
Pull request submitted: #184 |
The Stripe.URI module code should be reviewed. It's a small issue, but right now it uses
++
with the left operand as the accumulator and the right operand as the added value.++
is implemented such that the left operand is always copied, so our accumulator is always copied (which is what we don't want). See The Eight Myths of Erlang PerformanceThe text was updated successfully, but these errors were encountered: