Skip to content
Prev 43061 / 63424 Next

Byte compilation of packages on CRAN

On 11/04/2012 20:36, Matthew Dowle wrote:
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).
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).'

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.