Re: [Haskell-cafe] Help understanding Haskell runtime costs

2011-08-11 Thread Thiago Negri
So, thanks to Henning Thielemann I was able to make a code a little more functional. I did find ByteString module that really speed things up. I got 0.04 seconds with the following snippet: -- code start import qualified Data.ByteString.Char8 as BS import Data.Char (toLower) main :: IO () main =

Re: [Haskell-cafe] Help understanding Haskell runtime costs

2011-08-11 Thread Henning Thielemann
On 09.08.2011 01:43, Thiago Negri wrote: Hello all, I'm relatively new to Haskell and trying to solve some online judge's problems in it. One of the problems is to say if a given sentence is a tautogram or not. A tautogram is just a sentence with all the words starting with the same letter. My

[Haskell-cafe] Help understanding Haskell runtime costs

2011-08-08 Thread Thiago Negri
Hello all, I'm relatively new to Haskell and trying to solve some online judge's problems in it. One of the problems is to say if a given sentence is a tautogram or not. A tautogram is just a sentence with all the words starting with the same letter. My first try (solution is ok) was to do it as