-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
awaits-MRNo GHC MR (https://gitlab.haskell.org/ghc/ghc/-/merge_requests) has been raised yetNo GHC MR (https://gitlab.haskell.org/ghc/ghc/-/merge_requests) has been raised yet
Description
The base module Data.Complex includes specializations of most numerical functions and instances for Complex Double and sometimes Complex Float. The current set omits three sorts of specializations that may have quite severe negative performance impacts on downstream code:
- Many functions have specializations for
Complex Doubleonly, while downstream code would benefit fromComplex Floatas well. - The
Storableinstance has no specializations. This is problematic for a variety of downstream applications, e.g. this observed ~100x slow down of operations on storable vectors containingComplex Doubles:Complexsomehow destroys the performance of operations on storable vectors. vector#558 - It is quite common for programs manipulating complex numbers to deal with fixed width integer types.
Complex Int8andComplex Int16specializations would be very helpful (Complex Int32andComplex Int64perhaps less so).
Therefore I propose that base:
- Add
SPECIALISE ... Complex Floatto the set of specialized functions and instances. - Add the
Storableinstance to the set of specialized functions and instances. - Add
SPECIALISE ... Complex Int{8,16}to the set of specialized functions and instances. - Add
SPECIALISE ... ComplexInt{32,64}to the set of specialized functions and instances if anyone can find a person or program who cares for them to be added.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
awaits-MRNo GHC MR (https://gitlab.haskell.org/ghc/ghc/-/merge_requests) has been raised yetNo GHC MR (https://gitlab.haskell.org/ghc/ghc/-/merge_requests) has been raised yet