[Rd] New slimmer R
Prof Brian Ripley
Tue, 9 Oct 2001 08:46:30 +0100 (BST)
On Tue, 9 Oct 2001, Jonathan Rougier wrote:
> Hi Everyone,
> I know that Kurt is thinking about slimming down the core functions of R
> and putting more stuff into libraries. I was wondering if, as a first
> step, thought had been given to re-organising the source code to
> separate out the S-language functionality from the base package
> functions. I am thinking in particular of the subdirectory src/main
> which contains both top-level files such as "memory.c" and base-package
> files such as "optim.c". Would it not be clearer to mount the base
> package entirely on src/library and so put the required C files into the
> subdirectory src/library/base/src (which currently does not exist)?
Not really. If base remains a package, then base.so would have always to
be loaded, and no reduction would result. Also optim() etc are
implemented via .Internal, and at present .Internal functions (and
primitives) are determined by a compiled-in table. So the net result
would a lot of work, slower loading and probably a net increase in the
size of the running image.
It seems to me that slimming-down will only work (well) once we can split
base into a number of sub-packages which are auto-loaded as needed (not
necessarily by the autoload mechanism), and namespaces will be useful when
going along that route. Most of the space we could save is R code, not
compiled C code. I introduced modules to save much of the latter.
Brian D. Ripley, email@example.com
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org