Re: [Haskell-cafe] Arrays performance

2007-01-04 Thread Chris Kuklewicz
Paolo Veronelli wrote: > Quoting Paolo Veronelli <[EMAIL PROTECTED]>: >> I paste new version in case you care give me some moe suggestion. > > > > import Data.Maybe > import Data.List > import Data.Array.Diff > > import System.Environment > import Control.Arrow > import Control.Monad > > impo

Re: [Haskell-cafe] Arrays performance

2007-01-04 Thread Paolo Veronelli
Quoting Paolo Veronelli <[EMAIL PROTECTED]>: > I paste new version in case you care give me some moe suggestion. import Data.Maybe import Data.List import Data.Array.Diff import System.Environment import Control.Arrow import Control.Monad import Random inc l i = l // [(i,l!i + 1)] switch l

Re: [Haskell-cafe] Arrays performance

2007-01-03 Thread Paolo Veronelli
Quoting Udo Stenzel <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: > > It isn't, but not for the reasons you might suspect. You're using > 'nub', which is quadratic, and your 'coupage' is also quadratic because > it uses 'lookup' on a list, which is linear, a linear number of times. > You can ge

Re: [Haskell-cafe] Arrays performance

2007-01-01 Thread Udo Stenzel
[EMAIL PROTECTED] wrote: > I'm timing the following script.I'm not expert to evaluate th O'ness > of this code, I hope someone can do it. The program clusters n > integers in m buckets based on their distance. Anyway I thing should > be linear.So I timed som executions changing the first arg. > [

[Haskell-cafe] Arrays performance

2007-01-01 Thread paolo . veronelli
Good year everyone. I'm timing the following script.I'm not expert to evaluate th O'ness of this code, I hope someone can do it. The program clusters n integers in m buckets based on their distance. Anyway I thing should be linear.So I timed som executions changing the first arg. First argument