Open ocramz opened 5 years ago
These can be implemented 😁
For Int
, it's isomorphic to Word64
on ghc
on x64
, so unsafe casting between those types will get you the comparison for Int
.
Which one of these are you looking to expose from this library?
Thank you for the link! I don't know which bindings might be needed yet, but some people say leveraging this should give us faster sorting code thanvector-algorithms
. I would like to know more about this, could you briefly explain how are new instructions added ?
Unfortunately GHC doesn't support SIMD (yet).
There is ongoing work to improve SIMD support in GHC:
https://gist.github.com/Abhiroop/9a2600f24f8139b7fc0742a2b4585bb3
The work around (which is what this library does) is to write the relevant functions in C and then writing FFI wrappers to call the C functions.
Are there comparison operations for integer and floating point types, or how could they be implemented? Thanks!