Michael Lawrence
2010-Jun-11 19:51 UTC
[Rd] support for radix order() over entire range of integers
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 is just a matter of dynamic allocating the bucket array instead of the current static allocation. This would really help with e.g. sorting positions in the genome. I'm happy to submit a patch if this sounds sensible. Thanks, Michael [[alternative HTML version deleted]]
Prof Brian Ripley
2010-Jun-12 07:01 UTC
[Rd] support for radix order() over entire range of integers
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 itReally? 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
Seemingly Similar Threads
- [PATCH v17 2/6] radix tree test suite: add tests for xbitmap
- [PATCH v17 2/6] radix tree test suite: add tests for xbitmap
- sort.int(c(2, NA, 4), index.return=TRUE, na.last=NA, method)$ix differ for method="radix" and "shell"/"quick" (+ new default in R-devel)
- [Bug 547] Missing radix.o in makefile for AFS
- base::order making available retGrp and sortStr options for radix method?