[Haskell-cafe] Re: blas bindings, why are they so much slower the C?

2008-07-24 Thread Patrick Perry
Last month Anatoly Yakovenko published some disturbing numbers about the Haskell BLAS bindings I wrote being significantly slower than using plain C. I wanted to let everyone know that I've closed the performance gap, and now for doing ten million dot products, the overhead for using

Re: [Haskell-cafe] Re: blas bindings, why are they so much slower the C?

2008-07-24 Thread Don Stewart
patperry: Last month Anatoly Yakovenko published some disturbing numbers about the Haskell BLAS bindings I wrote being significantly slower than using plain C. I wanted to let everyone know that I've closed the performance gap, and now for doing ten million dot products, the

Re: [Haskell-cafe] Re: blas bindings, why are they so much slower the C?

2008-07-24 Thread Patrick Perry
Yeah, I think that's where most of the performance gains came from. I also added a re-write rule for unsafeGet dot (since it doesn't matter if the arguments are conjugated or not if the vectors are real) that shaved off about a tenth of a second. Patrick On Jul 24, 2008, at 4:26 PM,

[Haskell-cafe] Re: blas bindings, why are they so much slower the C?

2008-06-29 Thread patperry
Thanks for the patch, Don. I'm on vacation now, but I'll apply it when I get back. As for why getDot involves pattern matching, it is because a vector is either a pointer to raw storage, or a conjugated vector. I wrote a blog post about this for those of you who are interested (