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

Use ShortByteString instead of ByteString #61

Open
hasufell opened this issue Aug 5, 2022 · 0 comments
Open

Use ShortByteString instead of ByteString #61

hasufell opened this issue Aug 5, 2022 · 0 comments

Comments

@hasufell
Copy link
Collaborator

hasufell commented Aug 5, 2022

I don't see a compelling reason to use ByteString. We don't interact with FFI usually when dealing with URIs and we don't have crazy large bytestrings that would make a good argument for them to be pinned.

Similar to FilePaths... ShortByteString is the right decision here as it avoids memory fragmentation. The API has been greatly enhanced as part of the AFPP proposal, so you can use all the functions that ByteString has too: https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/Data-ByteString-Short.html

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

No branches or pull requests

1 participant