
On Wed, Jan 31, 2007 at 02:58:20AM +0300, Bulat Ziganshin wrote:
Hello David,
Saturday, January 27, 2007, 8:48:39 PM, you wrote:
I agree that numerics and Doubles are very important, but am of the opinion that we'll be better off if we (try to?) restrict ourselves to code that is really used by someone who really cares about performance enough to optimize it.
he should write an imperative code and in last Feb we've discussed why GHC don't generate good code for low-level imperative Haskell programs. you can see this discussion in GHC maillist. the problem is well known since GHC birth and GHC HQ plan to fix it by writing their own low-level optimizer. of course, it's hard to approach gcc, but results close to Ocaml may be accomplished; the only problem is lack of spare developer's hands :)
It all depends on what the someone is doing. If he's doing linear algebra, for example, he shouldn't be writing low-level code for anything but O(N) operations in any language, because that's stupid. And factors of two in the speed of O(N) operations don't much matter. But it's still nice to see that Haskell implementations can do a decent job at O(N) applications, and there are certainly cases a clean optimized Haskell library should be able to outperform a clean optimized C++ library (if you can agree with me that template expressions are dirty), due to the possibility of array fusion. -- David Roundy Department of Physics Oregon State University