-
Notifications
You must be signed in to change notification settings - Fork 157
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
Pure-haskell "memchr" #555
Conversation
I just noticed that all callsites are of form |
What would be some good benchmarks to run? I reached blindly and grabbed these ones:
(This is comparison of -fpure-haskell versus -fno-pure-haskell) |
I'm not too worried about performance in |
All uses of memchr wrapped and unwrapped C types, so I just moved all of that to the definition instead.
ee27683
to
697e5bf
Compare
This is ready now. |
Yay! Thanks @chreekat! |
Awesome! Now I can go back to converting my console app to a web app 😂 |
This removes use of utils.c under -fpure-haskell.
(Technically there is still one use site of _hs_text_memcmp2, but it's guarded by MIN_VERSION_BASE(4,11,0). Thus -fpure-haskell is not compatible with ghc-8.2. I think I'm ok with that.)
This PR will conflict with #545 , so I'll keep this one a draft until that one is finalized. Plus, my use of
toList
is probably dumb, and I'd like to come up with a better way of doing it.