[Haskell-cafe] vector-simd: some code available, and some questions
nicolas at incubaid.com
Sun Jul 8 02:22:48 CEST 2012
On Sat, 2012-07-07 at 21:13 +0200, Nicolas Trangez wrote:
> As you can see, the zipWith Data.Vector.SIMD implementation is slightly
> slower than the Data.Vector.Storable based one. I didn't perform much
> profiling yet, but I suspect allocation and ForeignPtr creation is to
> blame, this seems to be highly optimized in
> GHC.ForeignPtr.mallocPlainForeignPtrBytes as used by
I got the MV benchmark on-par with SV by reworking the allocation
mechanism: no more FFI involved, but based on
GHC.Exts.newAlignedPinnedByteArray# and some other trickery, see .
This could still be improved a little by using PlainPtr, but this is not
exported by GHC.ForeignPtr.
This did have a pretty big performance-impact on the SIMD-based
benchmark, compare  to the old one . I have no clue why the 4096
case now only uses twice the time of the 1024 one, unlike the expected
4x (+- as before).
More information about the Haskell-Cafe