Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  best performance with foldl (Roland Lei?a)


----------------------------------------------------------------------

Message: 1
Date: Sun, 06 Oct 2013 13:38:09 +0200
From: Roland Lei?a <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] best performance with foldl
Message-ID: <4619686.HqrrZOccZk@c64>
Content-Type: text/plain; charset="us-ascii"

Hi all,

for a benchmark I'd like to write code like this:
    foldl (+) [0 100000000]

how do I get the best performance out of it? However, It is important for me 
to rely on a higher-order function. Is it possible to be en par with the C 
version?
    int64_t result = 0;
    for (int64_t i = 0; i <= 100000000; ++i)
        result += i;

Many thanks in advance for helping out,
Roland



------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 64, Issue 10
*****************************************

Reply via email to