-
Notifications
You must be signed in to change notification settings - Fork 141
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
Switch between safe and unsafe calls to isValidUtf8 depending on size #451
Comments
This is an interesting observation. I can make that change easily enough - what do you think we should set the 'breakpoint' at which we separate safe and unsafe calls? |
I think around 1MB is reasonable. I've made a branch with benchmarks here. The results on my machine are:
The input is just |
Yeah, 1M sounds reasonable to me. Please patch an instance for bytestring/Data/ByteString/Short/Internal.hs Lines 613 to 614 in c7cba39
|
@noughtmare @kozross could one of you contribute a patch please? |
Does this require a benchmark? I can't really imagine that this might regress in the future. |
See https://www.reddit.com/r/haskell/comments/rc0us9/comment/hnrx0nr/?utm_source=share&utm_medium=web2x&context=3
CC @noughtmare @kozross
The text was updated successfully, but these errors were encountered: