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

urlEncode() should only copy if necessary #1076

Merged
merged 1 commit into from
May 12, 2015

Conversation

schuetzm
Copy link
Contributor

No description provided.

@s-ludwig
Copy link
Member

s-ludwig commented May 1, 2015

Could allOf make use of a sorted input array of characters and use a binary search (i.e. using assumeSorted)? Otherwise I'd use a switch range statement or an AA instead for efficiency reasons. Also for efficiency, using str.representation.allOf is preferred to avoid unnecessary UTF decoding.

@schuetzm schuetzm force-pushed the urlencode-dont-copy branch from 12f8827 to 9973465 Compare May 1, 2015 11:36
@schuetzm schuetzm force-pushed the urlencode-dont-copy branch from 9973465 to 0e3e3e3 Compare May 1, 2015 11:36
@schuetzm
Copy link
Contributor Author

schuetzm commented May 1, 2015

I changed it to a switch statement. Both DMD and LDC compile it into a lookup table.

@s-ludwig
Copy link
Member

Thanks, that should work.

s-ludwig added a commit that referenced this pull request May 12, 2015
urlEncode() should only copy if necessary
@s-ludwig s-ludwig merged commit 113a6b8 into vibe-d:master May 12, 2015
@schuetzm schuetzm deleted the urlencode-dont-copy branch May 12, 2015 13:49
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.

2 participants