[Haskell-cafe] newbie optimization question

Prabhakar Ragde plragde at uwaterloo.ca
Mon Oct 29 08:17:00 EDT 2007

Ryan Dickie wrote:
> One thing I've noticed is that turning on optimizations significantly 
> increases the speed of haskell code. Are you comparing code between 
> languages with -O2 or without opts?

I had done no optimization, but neither -O nor -O2 make a significant 
difference in either the C or Haskell programs. But using `rem` instead 
of `mod`, together with the type annotation, makes the two programs take 
pretty much the same amount of time. --PR

More information about the Haskell-Cafe mailing list