-
Notifications
You must be signed in to change notification settings - Fork 139
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
unboxed Vector Bool seems to be 8 times slower than unboxed Array Int Bool #495
Comments
The reason is that Since you're using |
Thanks for the quick and informative response! It certainly explains the performance difference but I'm surprised that it doesn't show up in bytes allocated. In any case I think we're agreed that this is a bug. IMHO and my less than expert knowledge it seems like a serious one. Thanks again! |
I verified that, as you said , {-# NOINLINE bv #-} is a workaround for the problem |
I don't think this is a bug in |
Thanks! Any ideas why the bug only happens with Vector and not with Array? |
I reported a related bug against ghc: https://gitlab.haskell.org/ghc/ghc/-/issues/25055 |
It's probably because |
Thanks, that makes sense. |
unboxed Vector Bool seems to be 8 times slower than unboxed Array Int Bool. As far as I can tell it is due to the performance difference in accessing array/vector elements. The following is with ghc 9.8.2 on an Intel Mac but I get about the same results on an M2 MacBook with ghc 9.10.1
prob171v.hs.txt
prob171a.hs.txt
The text was updated successfully, but these errors were encountered: