> Is this true in practice? That is, are there programs which have > different asymptotic running times when compiled under ghc or hbc > than when running under Hugs? I haven't tried in ghc, hbc, and Hugs specifically but it is a possible scenario. Consider: max [] = 0 max(x:xs) = if (x > (max xs)) then x else (max xs) max [1,2,3,4,5] An evaluator (presumably a non-optimizing interpreter) that doesn't lift the common subexpression (max xs) will require exponential time to compute the maximum of an ordered list. An optimizing compiler that shares the common subexpression will produce code that runs in linear time. --Amr
- Re: Reduction count as efficiency measure? Lennart Augustsson
- Re: Reduction count as efficiency measure? Jan Skibinski
- RE: Reduction count as efficiency measure? Hans Aberg
- RE: Reduction count as efficiency measure? Jan Skibinski
- Re: Reduction count as efficiency measure? Fergus Henderson
- Re: Reduction count as efficiency measure? Lennart Augustsson
- Re: Reduction count as efficiency measure? Graeme Moss
- Re: Reduction count as efficiency measure? Graeme Moss
- Re: Reduction count as efficiency measure? Keith Wansbrough
- Re: Reduction count as efficiency measure? Carl R. Witty
- Re: Reduction count as efficiency measure? Amr A Sabry
- Re: Reduction count as efficiency measure? Ralf Hinze
- Re: Reduction count as efficiency measure? Carl R. Witty
- Re: Reduction count as efficiency measure? Lennart Augustsson
- RE: Reduction count as efficiency measure? Simon Peyton-Jones
- Re: Reduction count as efficiency measure? Bart Demoen
- Re: Reduction count as efficiency measure? Olaf Chitil