[Haskell-cafe] vector to uvector and back again

Don Stewart dons at galois.com
Mon Feb 15 19:10:38 EST 2010


dan.doel:
> On Thursday 11 February 2010 8:54:15 pm Dan Doel wrote:
> > On Thursday 11 February 2010 12:43:10 pm stefan kersten wrote:
> > > On 10.02.10 19:03, Bryan O'Sullivan wrote:
> > > > I'm thinking of switching the statistics library over to using vector.
> > > 
> > > that would be even better of course! an O(0) solution, at least for me ;)
> > > let me know if i can be of any help (e.g. in testing). i suppose
> > > uvector-algorithms would also need to be ported to vector, then.
> > 
> > I could do this.
> 
> To this end, I've done a preliminary port of the library, such that all the 
> modules compile. I've just used safe operations so far, so it's probably a 
> significant decrease in performance over the 0.2 uvector-algorithms (unless 
> perhaps you turn off the bounds checking flag), but it's a start. It can be 
> gotten with:
> 
>   darcs get http://code.haskell.org/~dolio/vector-algorithms

I've ported uvector's tests to vector, and mostly got identical code,
except for:

    * tail
    * zip*
    * empty/null

I think if you find any slowdown over uvector it has to be a bug in
vector. Let Roman know.

-- Don


More information about the Haskell-Cafe mailing list