title: why polymorphism is so costly in haskell(GHC)?
body: <p>I am asking this question with refernce to <a href="https://stackoverflow.com/questions/5707250/optimizing-numerical-array-performance-in-haskell/5707388#5707388">this</a> SO question.
  Accepted answer by Don stewart : First line says "Your code is highly polymorphic change all float vars to Double .." and it gives 4X performance improvement.</p>
  
  <p>I am interested in doing matrix computations in Haskell, should I make it a habit of writing highly monomorphic code?</p>
  
  <p>But some languages make good use of ad-hoc polymorphism to generate fast code, why GHC won't or can't? (read C++ or D)</p>
  
  <p>why can't we have something like blitz++ or eigen for Haskell? I don't understand how typeclasses and (ad-hoc)polymorphism in GHC work.</p>