[Haskell-cafe] ghc/profiling and very big "entries"

2012-04-18 Thread Emmanuel CHANTREAU
Hello I got this line in the profile output: COST CENTRE MODULE no.entries %time %alloc %time %alloc ticks bytes addDeductionL42s.Maths.Prover.Base 22730 2362045 1.14.65

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Emmanuel CHANTREAU
Hello First, thank you for all answers. Le Thu, 03 Dec 2009 18:58:33 +0300, Miguel Mitrofanov a écrit : > Does this really mean that you want to know how the garbage collector > works? Well, I try to understand your question... I will take an example: f x y= x+y The program ask the user to

[Haskell-cafe] GHC magic optimization ?

2009-12-03 Thread Emmanuel CHANTREAU
Hello One thing is magic for me: how GHC can know what function results to remember and what results can be forgotten ? Is it just a stupid buffer algorithm or is there some mathematics truths behind this ? I'm very happy about Haskell, it's so great to put some smart ideas in a computer. thank

Re: [Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Emmanuel CHANTREAU
Le Thu, 3 Dec 2009 13:20:31 +0100, David Virebayre a écrit : > It doesn't work this way : Strings are just lists of Chars. Comparison > is made recursively, Char by Char. You can have a look at the source > to make sure : > > instance (Eq a) => Eq [a] where > [] == [] = True > (x

[Haskell-cafe] Optimization with Strings ?

2009-12-03 Thread Emmanuel CHANTREAU
Hello In my futur program, it use a lot of binary trees with strings (words) as leaf. There is just arround 1000 words and they will appear a lot of times. The program will possibly consume a lot of process and memory (it is a mathematics proover). I began this program in C++ but haskell has a pr