profiling question
Amanda Clare
ajc99 at aber.ac.uk
Wed Aug 29 07:03:34 EDT 2001
I have a profile that looks like this:
COST CENTRE MODULE %time %alloc
GC GC 164.9 0.0
subsumes Cover 98.7 945.8
sub Cover 0.6 75.7
c_unify Cover 0.4 15.9
compose Cover 0.2 4.5
countFreqs Cover 0.0 2.4
lexer BGKBParser 0.0 1.5
isNameChar BGKBParser 0.0 1.3
and the detail:
fits Cover 397920 0.0 0.9 99.9 93.0
subsumes Cover -1452515424 98.7 945.8 99.9
92.1
sub Cover 42784164 0.6 69.4 0.6 69.4
c_unify Cover 6760353 0.4 15.9 0.6 26.7
What does 945.8% mean for my "subsumes" function? Are these percents not
out of 100 then? Could it be taking that much time because it's doing an
exceptional amount of memory allocation?
Amanda
> subsumes :: Pred -> Example -> Binding -> Maybe Bindings
> subsumes pred [] binding = Nothing
> subsumes p@(Pred name args) ((Pred ename eargs):rest) binding =
> let sargs = foldl sub args binding
> seargs = foldl sub eargs binding
> otherbss = subsumes p rest binding
> in
> if name == ename && length args == length eargs
> then let newbs = c_unify sargs seargs binding
> in case newbs of Nothing -> otherbss
> Just newb -> case otherbss of
> Nothing -> Just [newb]
> Just bss2 ->
> Just (newb : bss2)
> else subsumes p rest binding
More information about the Glasgow-haskell-bugs
mailing list