Re: [Haskell] Re: Probably a trivial thing for people knowing Haskell

2008-10-21 Thread Friedrich
Well I never have tried to profile here's my first try. I compiled with ghc --make -O -prof -auto-all chk_dwlds.hs I've run the program with: ./chk_dwlds \+RTS -p \-RTS and got this .prof file Tue Oct 21 15:01 2008 Time and Allocation Profiling Report (Final) chk_dwlds +RT

Re: [Haskell] Re: Probably a trivial thing for people knowing Haskell

2008-10-21 Thread Ketil Malde
Friedrich <[EMAIL PROTECTED]> writes: > Even the ruby solution need just > check_downloads/check_downloads.rb . 1,25s user 0,06s system 99% cpu > 1,322 total [...] > but the haskell solution: > ./chk_dwlds 17,71s user 0,11s system 99% cpu 17,836 total I'm very surprised to see this. Did y

Re: [Haskell] Re: Probably a trivial thing for people knowing Haskell

2008-10-21 Thread Friedrich
the posted codes runs in constant memory, so yes that make it possible that the stuff runs. That's really nice. Howerver the time is drastically bad Even the ruby solution need just check_downloads/check_downloads.rb . 1,25s user 0,06s system 99% cpu 1,322 total Here's the ruby code #!/usr/bin

[Haskell] Re: Probably a trivial thing for people knowing Haskell

2008-10-21 Thread apfelmus
Friedrich wrote: > Paul Johnson writes: >> >> -- Concatenate all the files into one big string. File reading is >> lazy, so this won't take all the memory. >> getAllFiles :: [String] -> IO String >> getAllFiles paths = do >> contents <- mapM getFile paths >> return $ concat contents >> >> Then

[Haskell] Re: Probably a trivial thing for people knowing

2008-10-20 Thread John Lato
Friedrich wrote: > "Brandon S. Allbery KF8NH" <[EMAIL PROTECTED]> writes: > >> On 2008 Oct 19, at 2:26, Friedrich wrote: >>> Paul Johnson <[EMAIL PROTECTED]> writes: > (By the way, putting in the top level type declarations helps a lot when you make a mistake.) >>> Well I have my problems