RE: Program slower with local definitions

2006-09-05 Thread Simon Peyton-Jones
FP. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users- | [EMAIL PROTECTED] On Behalf Of Michael Marte | Sent: 05 September 2006 17:40 | To: glasgow-haskell-users@haskell.org | Subject: Program slower with local definitions | | Hello *, | | I noticed a five percent s

Re: Program slower with local definitions

2006-09-05 Thread Rene de Visser
"Michael Marte" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hello *, > > I noticed a five percent speed up by making local definitions global. Maybe the global defintions are monomorphic, and the local defintions are polymorphic. You could evaluate the types of the global t

Program slower with local definitions

2006-09-05 Thread Michael Marte
Hello *, I noticed a five percent speed up by making local definitions global. This is the first version with local definitions: f = where mySet = foldl (flip Set.insert) Set.empty myList myList = Then I moved mySet and myList to the top level which gave me the speed up. Shouldn