On 02 November 2005 17:06, Scherrer, Chad wrote:

>> Surely not... sum is defined by Haskell 98 as:
>> 
>>  sum = foldl (+) 0
>> 
>> and this is exactly what GHC provides.  Furthermore we have
>> specialised strict versions for Int and Integer.
>> 
> 
> I'd been using ghci for testing along the way and getting terrible
> results; does the specialization only apply to ghc per se? 

Yes, you need 'ghc -O' to get the optimised versions.  The performance
characteristics of unoptimised (including interpreted) code are often
quite different.  You can load the optimised module into GHCi, of
course.

Cheers,
        Simon
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to