Re: [Rd] Byte compilation of packages on CRAN

From: Matthew Dowle <mdowle_at_mdowle.plus.com>
Date: Thu, 12 Apr 2012 07:54:17 +0100

> On 11/04/2012 20:36, Matthew Dowle wrote:
>> In DESCRIPTION if I set LazyLoad to 'yes' will data.table (for example)
>> then be byte compiled for users who install the binary package from CRAN
>> on Windows?
>
> No. LazyLoad is distinct from byte compilation. All installed packages
> use lazy loading these days (for simplicity: a very few do not benefit
> from it as they use all their objects at startup).
>
>> This question is based on reading section 1.2 of this document :
>> http://www.divms.uiowa.edu/~luke/R/compiler/compiler.pdf
>> I've searched r-devel and Stack Overflow history and have found
>> questions and answers relating to R CMD INSTALL and install.packages()
>> from source, but no answer (as yet) about why binary packages for
>> Windows appear not to be byte compiled.
>> If so, is there any reason why all packages should not set LazyLoad to
>> 'yes'. And if not, could LazyLoad be 'yes' by default?
>
> I wonder why you are not reading R's own documentation. 'Writing R
> Extensions' says
>
> 'The `LazyData' logical field controls whether the R datasets use
> lazy-loading. A `LazyLoad' field was used in versions prior to 2.14.0,
> but now is ignored.
>
> The `ByteCompile' logical field controls if the package code is
> byte-compiled on installation: the default is currently not to, so this
> may be useful for a package known to benefit particularly from
> byte-compilation (which can take quite a long time and increases the
> installed size of the package).'
>

Oops, somehow missed that. Thank you!

> Note that the majority of CRAN packages benefit very little from
> byte-compilation because almost all the time of their computations is
> spent in compiled code. And the increased size also may matter when the
> code is loaded into R.
>
>> Thanks,
>> Matthew
>>
>> ______________________________________________
>> 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 Thu 12 Apr 2012 - 07:04:13 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 12 Apr 2012 - 07:10:43 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