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

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Jun 12 09:01:47 CEST 2010


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



More information about the R-devel mailing list