-
Notifications
You must be signed in to change notification settings - Fork 7
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 SIMD intrinsics for reverseBits
#71
Conversation
I realized that none of emulated jobs test new C implementations because bitvec/.github/workflows/ci.yml Lines 90 to 95 in 8ae40af
Could you possibly fix this please? |
How would I do that? Would it suffice to add a line
? |
It requires some trial and error, I'm afraid. Definitely |
Is there no way to install GHCup or at least cabal on these architectures? That would make things a lot easier. |
Emulation is terribly expensive: a single process with Haskell RTS eats 7-8 Gb of RAM, so Cabal running GHC almost certainly fails with OOM. I've experimented with it a lot some time ago, and running barebone GHC proved to be the most reliable option. Unfortunately. |
You can do most of experiments locally or on a virtual machine with Ubuntu. It should not be too bad, e. g., |
Great stuff! |
Refs #66.
There are three C implementations:
The SIMD versions are behind an
#ifdef __x86_64__
(which is defined by both gcc and clang) and the specific version is selected via__builtin_cpu_supports
(which is again defined by both gcc and clang).I increased the number of
reverseBits
tests to 500, to make it more likely to catch errors in the C implementation (I intentionally introduced some bugs and some would only show up after a few runs of the test suite, with the default 100 tests).Benchmark results (with #70)