Re: [Rd] support for radix order() over entire range of integers

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat, 12 Jun 2010 08:01:47 +0100 (BST)

On Fri, 11 Jun 2010, Michael Lawrence wrote:

> Hi,
>
> Is there any good reason not to allow radix sorting via order() over the
> entire range of R (32bit) integers, instead of setting a hard limit at
> 100,000? Many machines have plenty of memory to support this. Seems like it

Really? That's 16Gb on my understanding of your proposal (2^32-1 4-byte uints). Not 'many machines' in my experience, but some. But the limit was set in 2003 when that code was written, and it was added for speed with factors, where 100,000 was plenty.

> is just a matter of dynamic allocating the bucket array instead of the
> current static allocation.

Hmm, it is currently automatically allocated: it would need to be malloc-ed. Might be worth keeping automatic allocation for smaller ranges.

> This would really help with e.g. sorting positions in the genome.
>
> I'm happy to submit a patch if this sounds sensible.

Yes please.

> Thanks,
> Michael
>
> [[alternative HTML version deleted]]

Please don't send HTML.

>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat 12 Jun 2010 - 07:05:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Jun 2010 - 17:11:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive