On Mon, 9 Jun 2003, Prof Brian Ripley wrote:
> On Sun, 8 Jun 2003, Göran Broström wrote:
>
> > On Sun, 8 Jun 2003, Thomas Lumley wrote:
> >
> > > On Sat, 7 Jun 2003, [ISO-8859-1] Göran Broström wrote:
> > >
> > > >
> > > > I need to order a long vector of integers with rather few unique values.
On Sun, 8 Jun 2003, Göran Broström wrote:
> On Sun, 8 Jun 2003, Thomas Lumley wrote:
>
> > On Sat, 7 Jun 2003, [ISO-8859-1] Göran Broström wrote:
> >
> > >
> > > I need to order a long vector of integers with rather few unique values.
> > > This is very slow:
> >
> >
> > I think the culprit is
On Sun, 8 Jun 2003, Thomas Lumley wrote:
> On Sat, 7 Jun 2003, [ISO-8859-1] Göran Broström wrote:
>
> >
> > I need to order a long vector of integers with rather few unique values.
> > This is very slow:
>
>
> I think the culprit is
>
> src/main/sort.c: orderVector1
>
> /* Shell sort isn'
On Sat, 7 Jun 2003, [ISO-8859-1] Göran Broström wrote:
>
> I need to order a long vector of integers with rather few unique values.
> This is very slow:
I think the culprit is
src/main/sort.c: orderVector1
/* Shell sort isn't stable, but it proves to be somewhat faster
to run a fina
On Sun, 8 Jun 2003, [ISO-8859-1] Göran Broström wrote:
> On Sat, 7 Jun 2003, Göran Broström wrote:
>
> >
> > I need to order a long vector of integers with rather few unique values.
> > This is very slow:
> >
> > > x <- sample(rep(c(1:10), 5))
> > > system.time(ord <- order(x))
> > [1] 189.18
On Sat, 7 Jun 2003, Göran Broström wrote:
>
> I need to order a long vector of integers with rather few unique values.
> This is very slow:
>
> > x <- sample(rep(c(1:10), 5))
> > system.time(ord <- order(x))
> [1] 189.18 0.09 190.48 0.00 0.00
>
> But with no ties
>
> > y <- sample(50
I need to order a long vector of integers with rather few unique values.
This is very slow:
> x <- sample(rep(c(1:10), 5))
> system.time(ord <- order(x))
[1] 189.18 0.09 190.48 0.00 0.00
But with no ties
> y <- sample(50)
> system.time(ord1 <- order(y))
[1] 1.18 0.00 1.18 0.00 0.0